/* Base form styles – no container bubble background */
form {
  width: 90%;
  margin: 2em auto;
  padding: 1em 0;
  font-family: "Poppins", sans-serif;
  /* Inherit the page’s background */
  background: none;
}

/* Each form group: stack label and input/textarea/select with spacing */
form .form-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5em;
  margin-bottom: 1.25em;
}

/* On larger screens, align label and input side‐by‐side */
@media screen and (min-width: 700px) {
  form .form-group {
    grid-template-columns: 1fr 2fr;
    align-items: center;
  }
}

/* Form labels: modern and legible */
form label {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Input, textarea, and select fields: subtle borders and transparency */
form input,
form textarea,
form select {
  background: transparent;
  border: 1px solid var(--deepbackground);
  border-radius: 4px;
  padding: 0.6em;
  color: var(--deepbackground);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

/* Focus state: highlight with a cool blue border */
form input:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: var(--purple, #0c8cfe);
}

/* Ensure textareas are user-friendly */
form textarea {
  resize: vertical;
  min-height: 100px;
}

form button {
  background: var(--purple);
  border: none;
  color: var(--foreground, #ffffff);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.8em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
  width: 100%;
  margin-top: 0.5em;
}

/* Button hover and active interactions */
form button:hover {
  filter: brightness(1.1);
}
form button:active {
  filter: brightness(0.9);
}

/* Small print text (for hints, etc.) */
form .text-muted {
  font-size: 0.85rem;
  color: var(--midground);
}

/* Error message styling */
form .error {
  color: var(--red, #ea3329);
  font-size: 0.9rem;
}

/* Hide any elements with the ".hidden" class */
form .hidden {
  display: none;
}

/* Mobile adjustments: on screens <700px, full-width fields */
@media screen and (max-width: 700px) {
  form .form-group {
    grid-template-columns: 1fr;
  }
}
