/* ============================================================================
   css/components/modals.css — Modal/Dialog/Overlay Components (v1)
   ----------------------------------------------------------------------------
   Bootstrap modal overrides (used by Student/Category forms), the
   app-polish confirm dialog (.ap-modal), and the login screen's
   self-contained overlay modal (forgot-password / change-password).
   ============================================================================ */

/* ══════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════ */
.modal-10 .modal-content {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: 0 16px 48px rgba(0,0,0,.18);
}
.modal-header {
  border-bottom: 1px solid #f0f0f0;
  padding: 16px 20px 14px;
}
.modal-footer {
  border-top: 1px solid #f0f0f0;
  padding: 12px 20px;
}
.modal-title { font-weight: 700 !important; font-size: 17px !important; }


/* ── Unsaved-changes confirm modal (reuses export-modal look) ── */
.unsaved-modal-icon { font-size: 28px; color: #b5840c; margin-bottom: 10px; }

@keyframes exportModalIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ap-modal-overlay {
  position: fixed; inset: 0; background: rgba(20,18,30,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 3100; padding: 16px;
}
.ap-modal-overlay[hidden] { display: none; }
.ap-modal {
  background: #fff; border-radius: 14px; max-width: 340px; width: 100%;
  padding: 22px 22px 18px; box-shadow: 0 16px 40px rgba(0,0,0,.28); text-align: center;
  animation: exportModalIn .16s ease;
}
.ap-modal h3 { margin: 0 0 6px; font-size: 16.5px; color: #222; }
.ap-modal p { margin: 0 0 18px; font-size: 13.5px; color: #555; line-height: 1.4; }
.ap-modal-actions { display: flex; gap: 10px; }
.ap-modal-actions button {
  flex: 1; border-radius: 999px; padding: 11px 14px; font-size: 14px;
  font-weight: 600; border: none; cursor: pointer; min-height: 44px; touch-action: manipulation;
}
@media (prefers-reduced-motion: reduce) { .ap-modal { animation: none; } }


/* ══════════════════════════════════════════════
   LOGIN — overlay modal (Forgot Password / Change Password)
   (moved from inline <style> in login.html)
══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(20,16,40,.55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: #fff; border-radius: 16px; width: 100%; max-width: 360px;
  padding: 26px 22px; box-shadow: 0 20px 60px rgba(43,38,64,.25);
  animation: slideUp .22s ease both;
  max-height: 90vh; overflow-y: auto;
}
.modal-card h3 { font-size: 16px; color: var(--brand, #2B2640); font-weight: 700; margin-bottom: 4px; }
.modal-card .sub { font-size: 12px; color: #bbb; margin-bottom: 14px; }

/* Token step (multi-step modal flow) */
.step { display: none; }
.step.active { display: block; }
