/* Modern, professional form styles for EGAC (copied from src/styles/forms.css) */

.egac-form {
  font-family: var(--font-sans);
  color: var(--dark-gray);
}

/* Form structure */
.egac-form .form-group {
  margin-bottom: 1.5rem;
}

.egac-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Remove bottom margin from form-groups inside form-row to prevent misalignment */
.egac-form .form-row .form-group {
  margin-bottom: 0;
}

.egac-form .form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dark-gray);
  letter-spacing: 0.01em;
}

/* Input fields */
.egac-form input[type="text"],
.egac-form input[type="email"],
.egac-form input[type="tel"],
.egac-form input[type="date"],
.egac-form select,
.egac-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--dark-gray);
  border-radius: 10px;
  border: 2px solid rgba(20, 95, 186, 0.12);
  background: #ffffff;
  transition: all 0.2s ease;
  line-height: 1.5;
  height: auto;
  min-height: 3rem;
  appearance: none;
  -webkit-appearance: none;
}

/* Ensure date inputs visually match other inputs (DOB) */
.egac-form input[type="date"] {
  padding-right: 1rem;
  /* avoid calendar icon overlapping text */
}

.egac-form select {
  height: 3rem;
}

/* Slightly style the calendar icon so it blends with the form */
.egac-form input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.85;
  filter: none;
}

/* For Firefox, ensure date input text and caret are consistent */
@-moz-document url-prefix() {
  .egac-form input[type="date"] {
    color: var(--dark-gray);
  }
}

.egac-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
  max-width: 60ch;
  /* narrower for better visual balance */
  margin-right: auto;
  /* align to left of column, avoid centering */
  box-sizing: border-box;
  width: 100%;
}

/* Constrain phone input so it doesn't stretch excessively on wide layouts */
.egac-form input[type="tel"] {
  max-width: 18ch;
  /* slightly narrower (~288px) */
  margin-right: auto;
  display: block;
}

/* Phone cell ensures phone sits under first column on md+ screens */
.egac-form .phone-cell {
  grid-column: 1 / 2;
  /* place under first column */
}

/* On small screens, allow inputs to be full width */
@media (max-width: 768px) {
  .egac-form textarea {
    max-width: none;
  }

  .egac-form input[type="tel"] {
    max-width: none;
  }

  .egac-form .phone-cell {
    grid-column: auto;
  }
}

.egac-form input::placeholder,
.egac-form textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
}

/* Focus states */
.egac-form input:focus,
.egac-form select:focus,
.egac-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20, 95, 186, 0.1),
    0 8px 24px rgba(20, 95, 186, 0.08);
  background: #ffffff;
}

/* Select dropdown */
.egac-form select {
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%23374151" d="M4 6l4 4 4-4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  color: var(--dark-gray);
  /* ensure selected value is readable */
  background-color: #ffffff;
}

/* When select is showing the placeholder option (required + empty), show muted colour */
.egac-form select:invalid {
  color: #9ca3af;
}

/* Ensure options themselves are readable in the native dropdown */
.egac-form select option {
  color: var(--dark-gray);
  background: #ffffff;
}

/* Make the placeholder option show muted color */
.egac-form select option[value=""] {
  color: #9ca3af;
}

/* Radio and checkbox groups */
.egac-form .radio-group,
.egac-form .inline-controls {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Success & error messages */
.egac-form .form-success {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #dcffe8 0%, #e8fff0 100%);
  border: 2px solid rgba(34, 197, 94, 0.2);
  color: #065f46;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.08);
}

/* ... rest omitted for brevity (same content as src/styles/forms.css) */