/* ============================================================
   forms.css — Shared styling for all school forms
   Include via: <link rel="stylesheet" href="/stylesheets/forms.css">
   ============================================================ */

/* ── Page wrapper ─────────────────────────────────────────── */
.form-page {
  max-width: 820px;
  margin: 0 auto 3rem auto;
  padding: 0 1rem;
}

/* ── Form header banner ───────────────────────────────────── */
.form-header {
  background: linear-gradient(135deg, #1a3a6b 0%, #0d47a1 100%);
  color: #fff;
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.form-header-left { display: flex; align-items: center; gap: 0.85rem; }
.form-header-icon {
  font-size: 1.8rem;
  opacity: 0.9;
  flex-shrink: 0;
}
.form-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.15rem 0;
  line-height: 1.2;
}
.form-header p {
  font-size: 0.82rem;
  opacity: 0.85;
  margin: 0;
}
.form-header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.form-header-actions .btn {
  font-size: 0.8rem;
  padding: 5px 14px;
}

/* ── Section cards ────────────────────────────────────────── */
.form-section {
  background: #fff;
  border: 1px solid #e0e4ea;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.form-section-header {
  background: #f4f6fb;
  border-bottom: 1px solid #e0e4ea;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #374151;
}
.form-section-header i { color: #1a3a6b; font-size: 0.95rem; }
.form-section-body { padding: 1.25rem 1.25rem 0.5rem; }

/* ── Instructions block ───────────────────────────────────── */
.form-instructions {
  background: #eef3ff;
  border-left: 4px solid #1a3a6b;
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.87rem;
  color: #1e3a5f;
}
.form-instructions ol, .form-instructions ul { margin-bottom: 0; padding-left: 1.2rem; }
.form-instructions li { margin-bottom: 0.3rem; }

/* ── Labels above inputs ──────────────────────────────────── */
.form-label-top {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 0.3rem;
  display: block;
}
.form-group { margin-bottom: 1rem; }

/* ── Input focus ring ─────────────────────────────────────── */
.form-control:focus {
  border-color: #1a3a6b;
  box-shadow: 0 0 0 0.15rem rgba(26,58,107,0.18);
}

/* ── Section divider ──────────────────────────────────────── */
.form-divider {
  border: none;
  border-top: 2px solid #e0e4ea;
  margin: 1.25rem 0;
}

/* ── Inline notice / warning ──────────────────────────────── */
.form-notice {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  font-size: 0.84rem;
  color: #6d4c00;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.form-notice i { margin-top: 2px; flex-shrink: 0; }

/* ── Approval status block ────────────────────────────────── */
.approval-block {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.6rem 0;
}
.approval-block .form-check { margin-bottom: 0; }
.approval-block .form-check-label { font-weight: 600; font-size: 0.9rem; }

/* ── Submit footer ────────────────────────────────────────── */
.form-submit-footer {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  border-top: 1px solid #e0e4ea;
  margin-top: 0.75rem;
}
.form-submit-footer .btn-submit {
  background: #1a3a6b;
  border-color: #1a3a6b;
  color: #fff;
  padding: 10px 40px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.2s;
}
.form-submit-footer .btn-submit:hover { background: #0d2d56; border-color: #0d2d56; }

/* ── Print styles ─────────────────────────────────────────── */
@media print {
  .form-header-actions, .navbar, nav, .form-submit-footer .btn-back { display: none !important; }
  .form-header { background: #1a3a6b !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .form-section { box-shadow: none; border: 1px solid #ccc; }
  body { font-size: 11pt; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 576px) {
  .form-header h1 { font-size: 1.1rem; }
  .form-header-actions .btn { font-size: 0.75rem; }
}


/* ================================================================
   AUTH CARD SYSTEM
   Shared styles for: login, register, forgot, reset, join, parent
   ================================================================ */

/* ── Centering wrapper ────────────────────────────────────── */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

/* ── Card shell ───────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.05);
  overflow: hidden;
}
.auth-card--wide { max-width: 560px; }

/* Restore placeholder text for cards using standard (non-floating) labels */
.auth-card--standard .form-control::placeholder { color: #9ca3af; }

/* ── Gradient header banner ───────────────────────────────── */
.auth-card-header {
  background: linear-gradient(135deg, #1a3a6b 0%, #2a52a0 100%);
  color: #fff;
  padding: 1.5rem 2rem;
  text-align: center;
}
.auth-card-header .ach-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.4rem;
  opacity: 0.88;
}
.auth-card-header h1,
.auth-card-header h2,
.auth-card-header h3,
.auth-card-header h4 {
  color: #fff !important;
  margin: 0 0 0.2rem !important;
  font-weight: 700 !important;
  font-size: 1.25rem !important;
  line-height: 1.25;
}
.auth-card-header .ach-sub {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.82;
}

/* ── Card body ────────────────────────────────────────────── */
.auth-card-body {
  padding: 1.75rem 2rem 1.5rem;
}

/* ── Inputs ───────────────────────────────────────────────── */
.auth-card .form-control {
  border-radius: 8px;
  border-color: #d1d9e0;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.auth-card .form-control:focus {
  border-color: #1a3a6b;
  box-shadow: 0 0 0 0.18rem rgba(26,58,107,0.15) !important;
}
/* Labels above inputs (standard layout, not floating) */
.auth-card .form-group > label:not(.form-label) {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.3rem;
}

/* ── Section divider inside form ──────────────────────────── */
.auth-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #6b7a8d;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.4rem 0 0.85rem;
}
.auth-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e9f0;
}
.auth-section-label i { color: #1a3a6b; }

/* ── Primary submit button ────────────────────────────────── */
.auth-btn-primary {
  display: block;
  width: 100%;
  padding: 11px 20px;
  background: linear-gradient(135deg, #1a3a6b 0%, #2a52a0 100%);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-size: 0.97rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.18s, box-shadow 0.18s;
  text-decoration: none !important;
  margin-top: 0.5rem;
}
.auth-btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 4px 14px rgba(26,58,107,0.28);
}

/* ── Social sign-in buttons ───────────────────────────────── */
.auth-btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.15s;
  margin-bottom: 8px;
}
.auth-btn-google {
  background: #fff;
  border: 1px solid #dadce0;
  color: #3c4043 !important;
}
.auth-btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
  color: #3c4043 !important;
}
.auth-btn-apple {
  background: #111;
  border: 1px solid #111;
  color: #fff !important;
}
.auth-btn-apple:hover {
  background: #333;
  color: #fff !important;
}
.auth-btn-social:disabled,
.auth-btn-social[disabled] { opacity: 0.45; cursor: default; }

/* ── OR divider ───────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #aab0ba;
  font-size: 0.78rem;
  margin: 1rem 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid #e5e9f0;
}

/* ── Footer link area (inside card) ───────────────────────── */
.auth-card-footer {
  text-align: center;
  padding: 0 2rem 1.5rem;
  font-size: 0.85rem;
  color: #6b7a8d;
}
.auth-card-footer a { color: #1a3a6b; font-weight: 500; }
.auth-card-footer a:hover { color: #0d2d56; }

/* ── Below-card extras (links, student join prompt) ───────── */
.auth-below-card {
  max-width: 440px;
  width: 100%;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7a8d;
}
.auth-below-card--wide { max-width: 560px; }
.auth-below-card a { color: #1a3a6b; font-weight: 500; }
.auth-below-card .btn-outline-success { border-radius: 8px; font-weight: 500; }

/* ── OAuth loading notice ─────────────────────────────────── */
.auth-oauth-loading {
  font-size: 0.78rem;
  color: #595959;
  text-align: center;
  margin-top: 4px;
  display: none;
}

/* ── Pick-name list (join flow) ───────────────────────────── */
.auth-card .list-group-item {
  border-color: #e5e9f0;
  transition: background 0.15s;
}
.auth-card .list-group-item:hover {
  background: #f0f4fb;
  color: #1a3a6b;
}
.auth-card .list-group-item:first-child { border-radius: 8px 8px 0 0; }
.auth-card .list-group-item:last-child  { border-radius: 0 0 8px 8px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 576px) {
  .auth-wrap { padding: 1.25rem 0.75rem 2rem; }
  .auth-card { border-radius: 12px; }
  .auth-card-header { padding: 1.25rem 1.5rem; }
  .auth-card-body { padding: 1.25rem 1.5rem 1rem; }
  .auth-card-footer { padding: 0 1.5rem 1.25rem; }
}
