/* Custom Styles & Single-Page Print CSS for Pendaftaran Wisuda Politeknik STIA LAN Makassar */

/* Toga Size Radio Selector */
.toga-radio {
  transition: all 0.2s ease-in-out;
}

.toga-radio:has(input:checked) {
  border-color: #084783 !important;
  background-color: #f0f7ff !important;
  box-shadow: 0 0 0 2px #084783;
}

.toga-radio:has(input:checked) span:first-of-type {
  color: #084783 !important;
}

/* Toga Size Chart Interactive Table */
.toga-table-row {
  transition: all 0.15s ease-in-out;
}

.toga-table-row.toga-row-active {
  background-color: #fef3c7 !important; /* amber-100 */
  box-shadow: inset 4px 0 0 #d97706;
}

.toga-table-row.toga-row-active td {
  color: #78350f !important;
  font-weight: 800 !important;
}

.toga-table-row.toga-row-active td:first-child {
  color: #b45309 !important;
  font-size: 1.1rem !important;
  font-weight: 900 !important;
}

/* Status Radio Selection in Verification Modal */
.status-choice:has(input:checked) {
  box-shadow: 0 0 0 2px currentColor;
}

/* Realtime Notification Toast Animation */
@keyframes notifSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-bounce-short {
  animation: notifSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ------------------------------------------------------------- */
/* ADVANCED PRINT & PDF EXPORT STYLING SYSTEM                   */
/* Supports 3 distinct modes: Card, Rekapitulasi, & Laporan     */
/* ------------------------------------------------------------- */

/* Official Kop Surat double border */
.kop-double-line {
  border-bottom: 3px solid #0f172a;
  padding-bottom: 2px;
  position: relative;
  margin-bottom: 14px;
}
.kop-double-line::after {
  content: '';
  display: block;
  border-bottom: 1px solid #0f172a;
  margin-top: 2px;
}

/* Standar Tabel Biasa untuk Rekap dan Laporan Resmi */
.tabel-biasa {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 11px;
  color: #0f172a;
  margin-bottom: 16px;
  background-color: #ffffff;
}

.tabel-biasa th,
.tabel-biasa td {
  border: 1px solid #334155 !important;
  padding: 5px 8px;
  vertical-align: middle;
}

.tabel-biasa thead th {
  background-color: #f1f5f9 !important;
  color: #000000 !important;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.02em;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.tabel-biasa tfoot td {
  background-color: #f8fafc !important;
  font-weight: 700;
  color: #000000 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

@media print {
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Always hide header bar, public nav, ticker, footer, modals, and toasts */
  #topBanner,
  header,
  footer,
  #loginModal,
  #toastContainer,
  .print-hidden,
  .print\:hidden,
  .rekap-no-print,
  .laporan-no-print,
  #adminHeader,
  #adminTabsNav {
    display: none !important;
  }

  thead {
    display: table-header-group !important;
  }

  tr, .avoid-break {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* ========================================================= */
  /* MODE 1: KARTU BUKTI PENDAFTARAN (1 HALAMAN A4 PORTRAIT)   */
  /* ========================================================= */
  body.print-mode-card {
    height: auto !important;
    max-height: 275mm !important;
    overflow: hidden !important;
    font-size: 11px !important;
  }

  body.print-mode-card @page {
    size: A4 portrait;
    margin: 8mm 10mm;
  }

  body.print-mode-card > *:not(#cardModal) {
    display: none !important;
  }

  body.print-mode-card #cardModal {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    overflow: hidden !important;
  }

  body.print-mode-card #cardModal > div {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
  }

  body.print-mode-card #printableCard {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 14px 18px !important;
    border: 2px solid #084783 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    background: #ffffff !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
    height: auto !important;
    max-height: 265mm !important;
    box-sizing: border-box !important;
  }

  body.print-mode-card #cardRowPembimbing2.hidden {
    display: none !important;
  }

  /* ========================================================= */
  /* MODE 2: REKAPITULASI RESMI (A4 PORTRAIT MULTI-PAGE FLOW)  */
  /* ========================================================= */
  body.print-mode-rekap {
    font-size: 11px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.print-mode-rekap @page {
    size: A4 portrait;
    margin: 8mm 12mm 12mm 12mm;
  }

  body.print-mode-rekap > *:not(#adminView) {
    display: none !important;
  }

  body.print-mode-rekap #adminHeader,
  body.print-mode-rekap #adminTabsNav,
  body.print-mode-rekap .rekap-no-print,
  body.print-mode-rekap #publicView,
  body.print-mode-rekap #cardModal,
  body.print-mode-rekap #adminTabDashboard,
  body.print-mode-rekap #adminTabRegistrations,
  body.print-mode-rekap #adminTabLaporan,
  body.print-mode-rekap #adminTabSettings {
    display: none !important;
  }

  body.print-mode-rekap #adminView {
    display: block !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
  }

  body.print-mode-rekap #adminTabRekap {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  body.print-mode-rekap #printableRekapReport {
    display: block !important;
    width: 100% !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* ========================================================= */
  /* MODE 3: LAPORAN KESELURUHAN (A4 LANDSCAPE MULTI-PAGE)     */
  /* ========================================================= */
  body.print-mode-laporan {
    font-size: 9.5px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.print-mode-laporan @page {
    size: A4 landscape;
    margin: 8mm 12mm 12mm 12mm;
  }

  body.print-mode-laporan > *:not(#adminView) {
    display: none !important;
  }

  body.print-mode-laporan #adminHeader,
  body.print-mode-laporan #adminTabsNav,
  body.print-mode-laporan .laporan-no-print,
  body.print-mode-laporan #publicView,
  body.print-mode-laporan #cardModal,
  body.print-mode-laporan #adminTabDashboard,
  body.print-mode-laporan #adminTabRegistrations,
  body.print-mode-laporan #adminTabRekap,
  body.print-mode-laporan #adminTabSettings {
    display: none !important;
  }

  body.print-mode-laporan #adminView {
    display: block !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
  }

  body.print-mode-laporan #adminTabLaporan {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  body.print-mode-laporan #printableFullReport {
    display: block !important;
    width: 100% !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  .tabel-biasa,
  body.print-mode-laporan table,
  body.print-mode-rekap table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  .tabel-biasa th,
  .tabel-biasa td,
  body.print-mode-laporan th,
  body.print-mode-laporan td,
  body.print-mode-rekap th,
  body.print-mode-rekap td {
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }

  .tabel-biasa thead th,
  body.print-mode-laporan thead th,
  body.print-mode-rekap thead th {
    background-color: #f1f5f9 !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .tabel-biasa tfoot td,
  body.print-mode-rekap tfoot td {
    background-color: #f8fafc !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}


/* Running Text Marquee Animation */
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.animate-marquee {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 32s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

/* ========================================================= */
/* ACCESSIBILITY (AKSESIBILITAS / RAMAH DISABILITAS)          */
/* ========================================================= */

/* Ukuran Font */
html.a11y-font-md {
  font-size: 112% !important;
}
html.a11y-font-lg {
  font-size: 125% !important;
}

/* Mode Kontras Tinggi */
html.a11y-high-contrast body {
  background-color: #000000 !important;
  color: #ffffff !important;
}
html.a11y-high-contrast .bg-white,
html.a11y-high-contrast .bg-slate-50,
html.a11y-high-contrast .bg-slate-100 {
  background-color: #121212 !important;
  color: #ffffff !important;
  border-color: #ffd700 !important;
}
html.a11y-high-contrast text,
html.a11y-high-contrast h1,
html.a11y-high-contrast h2,
html.a11y-high-contrast h3,
html.a11y-high-contrast h4,
html.a11y-high-contrast p,
html.a11y-high-contrast span:not(.badge-keep),
html.a11y-high-contrast label {
  color: #ffffff !important;
}
html.a11y-high-contrast a,
html.a11y-high-contrast button {
  color: #ffd700 !important;
}
html.a11y-high-contrast .border-slate-200,
html.a11y-high-contrast .border-slate-300 {
  border-color: #ffd700 !important;
}

/* Mode Monokrom (Grayscale) */
html.a11y-grayscale {
  filter: grayscale(100%) !important;
}

/* Mode Gelap (Dark Mode Lembut) */
html.a11y-dark-mode body {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
}
html.a11y-dark-mode .bg-white {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}
html.a11y-dark-mode .bg-slate-50 {
  background-color: #0f172a !important;
  color: #cbd5e1 !important;
}
html.a11y-dark-mode .text-slate-800,
html.a11y-dark-mode .text-slate-900 {
  color: #f8fafc !important;
}
html.a11y-dark-mode .text-slate-500,
html.a11y-dark-mode .text-slate-600 {
  color: #94a3b8 !important;
}

/* Font Ramah Disleksia / Keterbacaan Tinggi */
html.a11y-readable-font body,
html.a11y-readable-font * {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.04em !important;
  word-spacing: 0.08em !important;
  line-height: 1.6 !important;
}

/* Garis Bawah Semua Tautan */
html.a11y-underline-links a,
html.a11y-underline-links button[onclick*="scroll"],
html.a11y-underline-links .underline-target {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
}

/* Hentikan Animasi (Reduce Motion) */
html.a11y-reduce-motion *,
html.a11y-reduce-motion .animate-marquee,
html.a11y-reduce-motion .animate-pulse,
html.a11y-reduce-motion .animate-bounce {
  animation: none !important;
  transition: none !important;
}
html.a11y-reduce-motion .animate-marquee {
  transform: none !important;
  white-space: normal !important;
}

/* ========================================================= */
/* LIVE CHAT WIDGET STYLES                                   */
/* ========================================================= */

.live-chat-bubble-user {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #ffffff;
  border-top-right-radius: 4px;
}

.live-chat-bubble-admin {
  background: #f1f5f9;
  color: #0f172a;
  border-top-left-radius: 4px;
  border: 1px solid #e2e8f0;
}

.chat-message-scroll {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.chat-message-scroll::-webkit-scrollbar {
  width: 5px;
}
.chat-message-scroll::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

