/* ============================================================
   ENROLL.CSS — Enrollment Process Pages
   Design: BCP dark blue header, step bar, white content card
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #c8d8e8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.enroll-header {
  background: #1a3a8c;
  padding: 18px 24px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.enroll-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.enroll-header img {
  width: 42px;
  height: auto;
  object-fit: contain;
}

.enroll-school-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.enroll-page-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Step bar ── */
.step-bar-wrap {
  background: #d8e4ef;
  padding: 14px 24px 0;
}

.step-bar {
  background: #fff;
  border-radius: 10px;
  padding: 20px 32px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

/* Connector line */
.step-bar::before {
  content: '';
  position: absolute;
  top: 30px;
  left: calc(32px + 20px);
  right: calc(32px + 20px);
  height: 2px;
  background: #d0d7e2;
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #d0d7e2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #888;
  transition: background 0.2s, color 0.2s;
}

.step.done   .step-circle { background: #22c55e; color: #fff; }
.step.active .step-circle { background: #1a3a8c; color: #fff; box-shadow: 0 0 0 4px #bfdbfe; }

.step-label {
  font-size: 0.65rem;
  color: #999;
  text-align: center;
  line-height: 1.3;
  max-width: 72px;
}

.step.done   .step-label { color: #16a34a; }
.step.active .step-label { color: #1a3a8c; font-weight: 700; }

/* ── Content card ── */
.enroll-body {
  flex: 1;
  padding: 20px 24px 40px;
  background: #d8e4ef;
}

.enroll-card {
  background: #fff;
  border-radius: 10px;
  padding: 36px 44px 40px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.enroll-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a3a8c;
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #e0e4ea;
  margin-bottom: 28px;
}

/* ── Typography inside card ── */
.enroll-section-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1a3a8c;
  margin: 20px 0 10px;
}

.enroll-card p {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.65;
  margin-bottom: 8px;
}

.enroll-card ul {
  margin: 0 0 16px 20px;
  font-size: 0.82rem;
  color: #444;
  line-height: 1.9;
}

/* Two-column requirements layout */
.req-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

/* ── Branch / Course cards ── */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.option-card {
  border: 2px solid #d0d7e2;
  border-radius: 10px;
  padding: 20px 18px;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  text-decoration: none;
  color: #1a1a2e;
  background: #fff;
}

.option-card:hover {
  border-color: #1a3a8c;
  box-shadow: 0 4px 16px rgba(26,58,140,0.12);
  background: #eff6ff;
}

.option-card.selected {
  border-color: #1a3a8c;
  background: #eff6ff;
}

.option-card i {
  font-size: 1.8rem;
  color: #1a3a8c;
}

.option-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1a1a2e;
}

.option-card-sub {
  font-size: 0.72rem;
  color: #888;
  line-height: 1.4;
}

/* ── Form fields ── */
.enroll-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-top: 8px;
}

.enroll-form-grid .full { grid-column: 1 / -1; }

.enroll-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.enroll-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #444;
}

.enroll-field input,
.enroll-field select,
.enroll-field textarea {
  height: 40px;
  border: 1.5px solid #d0d7e2;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  color: #333;
  background: #fff;
}

.enroll-field textarea {
  height: 80px;
  padding: 10px 12px;
  resize: vertical;
}

.enroll-field input:focus,
.enroll-field select:focus,
.enroll-field textarea:focus {
  border-color: #1a3a8c;
  box-shadow: 0 0 0 3px rgba(26,58,140,0.1);
}

.enroll-field .req { color: #ef4444; font-size: 0.7rem; margin-left: 2px; }

/* ── Buttons ── */
.enroll-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.btn-proceed {
  background: #1a3a8c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background 0.2s;
  letter-spacing: 0.02em;
}

.btn-proceed:hover { background: #142d6e; }

.btn-back {
  background: #e8edf4;
  color: #444;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-back:hover { background: #d0d7e2; }

/* ── Success page ── */
.success-icon {
  font-size: 3rem;
  color: #22c55e;
  margin-bottom: 12px;
}

.success-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a3a8c;
  margin-bottom: 8px;
}

.success-sub {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 24px;
}

.ref-number {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 8px;
  padding: 14px 24px;
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a3a8c;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .enroll-card { padding: 24px 16px 28px; }
  .req-cols    { grid-template-columns: 1fr; }
  .enroll-form-grid { grid-template-columns: 1fr; }
  .enroll-form-grid .full { grid-column: 1; }
  .option-grid { grid-template-columns: 1fr 1fr; }
  .step-bar    { padding: 16px 12px 12px; }
  .step-label  { display: none; }
}

/* ── Alert banners (used by form.php validation) ── */
.auth-error {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.45;
}

.auth-success {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.45;
}

/* ════════════════════════════
   MODAL SYSTEM (enrollment flow)
════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal {
  background: #fff;
  border-radius: 12px;
  width: 420px;
  max-width: 95vw;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  overflow: hidden;
  animation: enrollModalIn 0.2s ease;
}
.modal-sm { width: 360px; }

@keyframes enrollModalIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal-header {
  background: #1a3a8c;
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.8;
  transition: opacity 0.15s;
  font-family: inherit;
}
.modal-close:hover { opacity: 1; }

.modal-body {
  padding: 24px 22px;
  max-height: 65vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: center;
}
.modal-footer-split {
  justify-content: space-between;
  gap: 12px;
}

.btn-modal-cancel {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 32px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  flex: 1;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.btn-modal-cancel:hover { background: #dc2626; }

.btn-modal-submit,
.btn-modal-confirm {
  background: #1a3a8c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 32px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  flex: 1;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.btn-modal-submit:hover,
.btn-modal-confirm:hover { background: #142d6e; }

@media (max-width: 640px) {
  .modal, .modal-sm { width: 95vw; }
  .modal-body { max-height: 70vh; }
}
