/* ============================================================
   admission.css  —  R.K.H.S. Admission Page Styles
   Covers: sidebar additions, form extras, photo box,
           south-disclaimer, print overlay, print @media
   Base styles (buttons, nav, footer, etc.) live in style.css
   ============================================================ */

/* ── SIDEBAR ADDITIONS ─────────────────────────────────────── */
.adm-docs-box {
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(255,255,255,.07);
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,179,0,.2);
}
.adm-docs-box h4 {
  font-size: .84rem; font-weight: 700;
  color: var(--gold-light); margin-bottom: 10px;
}
.adm-docs-box ul {
  padding-left: 14px; list-style: disc;
  display: flex; flex-direction: column; gap: 4px;
}
.adm-docs-box ul li { font-size: .77rem; color: rgba(255,255,255,.82); line-height: 1.5; }
.adm-hours { margin-top: 8px; font-size: .74rem !important; color: rgba(255,255,255,.5) !important; }
.adm-note {
  margin-top: 14px; padding: 10px 14px;
  background: rgba(255,179,0,.08); border-radius: var(--r-sm);
  border: 1px solid rgba(255,179,0,.22);
  font-size: .74rem; color: rgba(255,255,255,.7); line-height: 1.6;
}

/* ── CLASS + PHOTO ROW ─────────────────────────────────────── */
.adm-class-photo-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 24px;
  align-items: start;
}
.adm-class-col { display: flex; flex-direction: column; gap: 14px; }

/* ── PHOTO BOX ─────────────────────────────────────────────── */
.adm-photo-col { display: flex; flex-direction: column; align-items: center; }
.photo-capture-box {
  width: 120px;
  border: 2px dashed var(--border);
  border-radius: var(--r-sm);
  background: var(--soft-gray);
  overflow: hidden;
  transition: var(--tr);
}
.photo-capture-box:hover { border-color: var(--navy-light); }

/* 3:4 fixed ratio frame */
.photo-frame {
  width: 120px;
  height: 160px;   /* 3:4 = 120 × 160 */
  position: relative;
  overflow: hidden;
  background: #e8eaf6;
}
.photo-frame img#photoPreview {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.photo-placeholder-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; padding: 10px;
  font-size: .72rem; color: var(--text-light); text-align: center;
}
.photo-icon { font-size: 2.2rem; }
.photo-hint { font-size: .62rem; color: #b0b8d0; }

.photo-btn-row {
  display: flex; gap: 4px; padding: 6px 5px;
  justify-content: center; background: var(--soft-gray);
}
.photo-btn {
  font-size: .62rem; font-weight: 600;
  padding: 4px 8px; border-radius: 4px;
  background: var(--navy); color: var(--white);
  cursor: pointer; border: none;
  font-family: var(--font-b); transition: var(--tr);
  display: inline-flex; align-items: center; gap: 3px;
}
.photo-btn:hover { background: var(--navy-dark); }
.photo-btn-clear { background: #C62828; }
.photo-btn-clear:hover { background: #B71C1C; }

/* ── SOUTH DISCLAIMER ─────────────────────────────────────── */
.south-disclaimer {
  margin-top: 8px;
  background: #FFEBEE;
  border: 1.5px solid #EF9A9A;
  border-left: 4px solid #C62828;
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: .8rem;
  color: #B71C1C;
  line-height: 1.65;
  font-family: var(--font-h);
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }

/* ── BPL CONDITIONAL ──────────────────────────────────────── */
#bplGroup { animation: fadeIn .3s ease; }

/* ── DECLARATION ──────────────────────────────────────────── */
.adm-declaration {
  background: var(--soft-gray);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px 18px;
}
.dec-text {
  font-size: .8rem; color: var(--text-mid);
  line-height: 1.8; font-family: var(--font-h);
}
.dec-eng { font-family: var(--font-b) !important; margin-top: 8px; }
.adm-declare-check {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px; cursor: pointer;
}
.adm-declare-check input[type="checkbox"] {
  width: 16px; height: 16px; margin-top: 2px;
  accent-color: var(--navy); flex-shrink: 0; cursor: pointer;
}
.adm-declare-check span { font-size: .8rem; color: var(--text-mid); line-height: 1.6; }

/* ── CAMERA MODAL ─────────────────────────────────────────── */
.camera-modal {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
.camera-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 18px;
  padding: 24px;
}
.camera-inner video {
  width: 100%; max-width: 380px; max-height: 60vh;
  border-radius: var(--r-md);
  border: 3px solid var(--gold);
  background: #000;
  object-fit: cover;
}
.camera-btns { display: flex; gap: 14px; }

/* ── PRINT OVERLAY ────────────────────────────────────────── */
.print-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.85);
  display: flex; flex-direction: column;
  align-items: center;
  overflow-y: auto;
  backdrop-filter: blur(6px);
}
.preview-topbar {
  position: sticky; top: 0; width: 100%; z-index: 2;
  background: var(--navy-dark);
  border-bottom: 2px solid var(--gold);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 11px 24px; gap: 12px; flex-wrap: wrap;
}
.preview-topbar-label {
  color: var(--gold-light); font-size: .87rem; font-weight: 600;
}
.preview-topbar-actions { display: flex; gap: 10px; align-items: center; }
.preview-close-btn {
  background: rgba(255,255,255,.1); color: var(--white);
  padding: 8px 16px; border-radius: 6px;
  font-size: .84rem; font-weight: 600; cursor: pointer;
  border: 1px solid rgba(255,255,255,.2);
  font-family: var(--font-b); transition: var(--tr);
}
.preview-close-btn:hover { background: #C62828; }

/* Print sheet — A4 width on screen */
.print-sheet {
  width: 794px;
  background: #fff;
  margin: 24px auto 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

/* ── TOAST ────────────────────────────────────────────────── */
.rkhs-toast {
  position: fixed; top: 24px; right: 24px; z-index: 10001;
  max-width: 380px; padding: 13px 18px; border-radius: var(--r-sm);
  font-size: .86rem; font-weight: 600;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  animation: slideDown .3s ease;
}
.rkhs-toast button {
  background: none; border: none; cursor: pointer;
  font-size: .9rem; opacity: .6; margin-left: auto;
  font-family: inherit;
}
@keyframes slideDown {
  from { transform: translateY(-18px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .adm-class-photo-row { grid-template-columns: 1fr; }
  .adm-photo-col { flex-direction: row; align-items: flex-start; gap: 14px; }
  .form-row.cols-3 { grid-template-columns: 1fr 1fr; }
  .preview-topbar { flex-direction: column; align-items: flex-start; }
  .print-sheet { width: 100%; margin: 0; }
}
@media (max-width: 480px) {
  .form-row.cols-3 { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   PRINT STYLES  —  A4, both pages, no UI chrome
   ════════════════════════════════════════════════════════════ */
@media print {
  /* Hide everything except the print sheet */
  body > *:not(.print-overlay) { display: none !important; }
  .print-overlay {
    position: static !important;
    background: none !important;
    overflow: visible !important;
    backdrop-filter: none !important;
    display: block !important;
    padding: 0 !important;
  }
  .preview-topbar { display: none !important; }
  .print-sheet {
    width: 100% !important;
    margin: 0 !important;
    box-shadow: none !important;
  }
  .pdf-page {
    width: 100% !important;
    min-height: auto !important;
    page-break-after: always;
    padding: 16mm 18mm !important;
  }
  .pdf-page:last-child { page-break-after: auto; }

  @page {
    size: A4 portrait;
    margin: 0;
  }
}

/* ── UNSAVED FORM MODAL ───────────────────────────────────── */
.unsaved-modal {
  position: fixed; inset: 0; z-index: 10002;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.unsaved-box {
  background: var(--white); border-radius: var(--r-lg);
  padding: 32px 28px; max-width: 420px; width: 90%;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35);
  animation: slideDown .3s ease;
}
.unsaved-icon { font-size: 2.4rem; margin-bottom: 12px; }
.unsaved-box h3 {
  font-family: var(--font-d); font-size: 1.25rem;
  color: var(--navy); margin-bottom: 12px;
}
.unsaved-box p { font-size: .88rem; color: var(--text-mid); line-height: 1.7; }
.unsaved-btns {
  display: flex; gap: 12px; justify-content: center;
  margin-top: 22px; flex-wrap: wrap;
}
