/* ============================================================
   CONTACT PAGE — Scoped overrides and contact-specific styles
   ============================================================ */

/* Form section transition */
#formSection {
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

/* Form card container */
.contact-form-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  position: relative;
}

/* ---- Override components.mjs generated form styles ---- */

/* The library wraps fields in .dataContainer with borders */
.contact-form-card .dataContainer {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Float labels generated by the library */
.contact-form-card .dataContainer > .row > [class*="col-"] > span {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1 !important;
  background-color: transparent !important;
  display: block;
  margin-bottom: 0.35rem;
}

.contact-form-card .dataContainer > .row > [class*="col-"] > span .small {
  font-family: "DM Sans", sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #1d1d1f !important;
}

/* Required asterisk */
.contact-form-card .required-asterisk {
  font-size: 0.5rem;
  color: var(--brand-secondary);
  vertical-align: super;
  margin-left: 2px;
}

/* Each field column — add vertical spacing */
.contact-form-card .dataContainer > .row > [class*="col-"] {
  margin-bottom: 1rem;
}

/* Text inputs and textareas */
.contact-form-card .form-control {
  border-radius: 12px !important;
  border: 1.5px solid rgba(0, 0, 0, 0.1) !important;
  padding: 0.7rem 1rem !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 0.95rem !important;
  transition: border-color 200ms ease, box-shadow 200ms ease !important;
  background: #fbfbfd !important;
}

.contact-form-card .form-control:focus {
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px rgba(68, 202, 129, 0.12) !important;
  background: #fff !important;
}

.contact-form-card textarea.form-control {
  border-radius: 14px !important;
  min-height: 80px !important;
  rows: 3 !important;
}

/* Nested collapsible group (Company/School) */
.contact-form-card .dataContainer .dataContainer {
  background: #f8f9fa !important;
  border-radius: 14px !important;
  padding: 1rem 1rem 0 !important;
  margin-top: 0.25rem !important;
}

/* Collapsible toggle label */
.contact-form-card .dataContainer > .row > [class*="col-"] > span[style*="cursor"] {
  font-family: "DM Sans", sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  padding: 0.5rem 0 !important;
}

.contact-form-card .dataContainer > .row > [class*="col-"] > span[style*="cursor"] .small {
  color: #6e6e73 !important;
}

/* Submit button */
.contact-form-card .btnGradient {
  display: flex;
  margin: 0.5rem auto 0 auto;
}

/* Back button — pill style in top-right */
.contact-form-card .btn-secondary {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  color: #6e6e73;
  border-radius: 50px;
  padding: 0.4rem 1.15rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: "DM Sans", sans-serif;
  transition: all 200ms ease;
  width: auto !important;
  margin: 0 !important;
}

.contact-form-card .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.2);
  color: #1d1d1f;
}

/* Validation error text */
.contact-form-card .text-danger {
  font-family: "DM Sans", sans-serif;
  font-size: 0.78rem;
}

/* Hide spinners that aren't active */
.contact-form-card .spinner-border.d-none {
  display: none !important;
}

/* ---- Role selection buttons ---- */

.btn-form-option {
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  cursor: pointer;
}

.btn-form-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border-color: var(--brand-primary);
}

.btn-form-option:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-form-option-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(68, 202, 129, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-form-option-icon i {
  font-size: 1.25rem;
  color: var(--brand-primary);
}

.btn-form-option-text {
  font-size: 0.95rem;
  line-height: 1.3;
}

/* ---- Success message ---- */

#imgFormSubmitted {
  display: block;
  max-height: 10rem;
  width: auto;
  margin: 1.5rem auto 0;
}

/* ---- Responsive ---- */

@media (max-width: 767px) {
  .contact-form-card {
    padding: 1.5rem;
    border-radius: 16px;
  }
  .btn-form-option {
    padding: 1rem;
  }
  .btn-form-option-icon {
    width: 40px;
    height: 40px;
  }
  .contact-form-card .btn-secondary {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 1rem !important;
  }
}
