/* Custom styles for Science Centre Kiosk */

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.4);
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.6);
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.glass-panel-glow {
    box-shadow: 0 0 25px -5px rgba(6, 182, 212, 0.15), 0 0 15px -5px rgba(99, 102, 241, 0.1);
}

/* Custom transitions and animations */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 15px 0px rgba(6, 182, 212, 0.3);
    }
    50% {
        box-shadow: 0 0 25px 4px rgba(6, 182, 212, 0.55);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* Modal Open state helpers */
.modal-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}
.modal-visible > div {
    transform: scale(1) !important;
}

/* Dynamic Selection Ring for Payment buttons */
.payment-btn-active {
    border-color: #06b6d4 !important;
    background: rgba(6, 182, 212, 0.1) !important;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}
.payment-btn-active svg {
    color: #22d3ee !important;
}
.payment-btn-active span {
    color: #e2e8f0 !important;
}

/* Active Category Tab */
.cat-tab-active {
    background-color: #545eff !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(84, 94, 255, 0.3);
}

/* Interactive card transitions */
.attraction-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.attraction-card:hover {
    transform: translateY(-2px);
    border-color: rgba(6, 182, 212, 0.6);
    box-shadow: 0 10px 20px -10px rgba(6, 182, 212, 0.2);
}

/* Light kiosk theme */
body {
    background: #f6f8fb !important;
}

#app-container {
    background: #f6f8fb !important;
    color: #0f172a !important;
}

#app-container header,
#app-container section > div:first-child,
#app-container aside > div {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 12px 30px -24px rgba(15, 23, 42, 0.35);
}

#app-container header {
    height: 72px !important;
}

#app-container header h1 {
    background: none !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

#app-container main {
    padding: 16px !important;
    gap: 16px !important;
    background: #f6f8fb !important;
}

#app-container section {
    gap: 14px !important;
}

#catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    align-content: start !important;
    overflow-y: hidden !important;
}

#app-container .attraction-card {
    min-height: 250px;
    background: #07111F !important;
    border-color: #0EA5E9 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

#app-container .attraction-card-selected {
    border-color: #38BDF8 !important;
    box-shadow: inset 0 0 0 2px #38BDF8 !important;
}

@media (max-width: 1300px) {
    #catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

#app-container .attraction-card h3 {
    overflow: visible !important;
    display: block !important;
    min-height: 0 !important;
}

#app-container .attraction-card:hover {
    border-color: #38BDF8 !important;
    box-shadow: none !important;
}

#app-container .attraction-card .text-cyan-400 {
    color: #38BDF8 !important;
}

#app-container .attraction-card .text-white {
    color: #ffffff !important;
}

#app-container .attraction-card .text-\[\#BAE6FD\] {
    color: #BAE6FD !important;
}

#app-container .cat-tab {
    background: transparent !important;
    color: #111827 !important;
}

#app-container .cat-tab-active {
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px -12px rgba(37, 99, 235, 0.8) !important;
}

#app-container .attraction-card .text-2xl {
    font-size: 1.25rem !important;
    line-height: 1.5rem !important;
}

#app-container .attraction-card .text-4xl {
    font-size: 2.25rem !important;
    line-height: 2.5rem !important;
}

#app-container aside {
    width: 360px !important;
}

#app-container aside > div > div:first-child,
#app-container aside .border-t {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

#app-container .bg-slate-950\/40,
#app-container .bg-slate-950\/30,
#app-container .bg-slate-950\/20,
#app-container .bg-slate-950\/80,
#app-container .bg-slate-900\/60,
#app-container .bg-slate-900\/40,
#app-container .bg-slate-800\/60 {
    background: #ffffff !important;
}

#app-container .border-slate-800,
#app-container .border-slate-800\/80,
#app-container .border-slate-800\/60,
#app-container .border-slate-850 {
    border-color: #e2e8f0 !important;
}

#app-container .text-slate-100,
#app-container .text-slate-200,
#app-container .text-slate-300 {
    color: #0f172a !important;
}

#app-container .text-slate-400,
#app-container .text-slate-500,
#app-container .text-slate-600 {
    color: #1f2937 !important;
}

#app-container .text-slate-700,
#app-container .text-slate-800,
#app-container .text-slate-900 {
    color: #020617 !important;
}

#app-container p,
#app-container label,
#app-container span,
#app-container td,
#app-container th {
    color: #111827;
}

#app-container .attraction-card .text-slate-500,
#app-container .attraction-card .text-slate-600,
#app-container aside .text-slate-400,
#app-container aside .text-slate-500,
#app-container aside .text-slate-600 {
    color: #0f172a !important;
}

#app-container .text-cyan-400,
#app-container .text-cosmic-300,
#app-container .text-cosmic-400 {
    color: #0891b2 !important;
}

#app-container .payment-btn {
    background: #eef2ff !important;
    border-color: #4f46e5 !important;
    color: #1e1b4b !important;
}

#app-container .visitor-segment {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

#app-container .visitor-type-btn {
    min-width: 120px;
    color: #111827 !important;
    background: #ffffff !important;
    border: 1px solid #dbe3ef;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#app-container .visitor-type-active {
    color: #ffffff !important;
    background: #0891b2 !important;
    border-color: #0891b2 !important;
    box-shadow: 0 10px 18px -14px rgba(8, 145, 178, 0.9);
}

#app-container #btn-checkout {
    box-shadow: 0 12px 20px -14px rgba(5, 150, 105, 0.7) !important;
}

/* Keypad focus styles */
.keypad-btn:active {
    background-color: #0f172a !important;
    transform: scale(0.95);
}

.pin-btn:active {
    background-color: #0f172a !important;
    transform: scale(0.95);
}

/* Dot indicator code */
.pin-dot-active {
    background-color: #22d3ee !important;
    box-shadow: 0 0 8px #22d3ee;
}


/* ==========================================================================
   HARDWARE PRINTER INTEGRATIONS (Dual Print Layout Engines)
   ========================================================================== */

@media print {
    /* Hide all default browser headers, footers, and page titles */
    @page {
        margin: 0;
    }
    
    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: monospace;
        height: auto;
        overflow: visible;
    }
}

/* --------------------------------------------------------------------------
   ENGINE 1: POS Thermal Receipt (80mm roll width)
   -------------------------------------------------------------------------- */
@media print {
    body.print-mode-receipt {
        width: 72mm;
    }

    body.print-mode-receipt #app-container,
    body.print-mode-receipt #keypad-modal,
    body.print-mode-receipt #payment-modal,
    body.print-mode-receipt #print-modal,
    body.print-mode-receipt #clerk-modal,
    body.print-mode-receipt #eod-report {
        display: none !important;
    }

    body.print-mode-receipt #thermal-receipt {
        display: block !important;
        width: 72mm !important;
        margin: 0 !important;
        padding: 4mm 2mm !important;
        box-sizing: border-box;
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Courier New', Courier, monospace;
        font-size: 11px;
        line-height: 1.3;
    }
}

/* Thermal receipt specific formatting styles */
.receipt-header {
    text-align: center;
    margin-bottom: 5px;
}
.receipt-title {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.receipt-separator {
    border-top: 1px dashed #000000;
    margin: 5px 0;
}
.receipt-double-separator {
    border-top: 2px double #000000;
    margin: 6px 0;
}
.receipt-flex {
    display: flex;
    justify-content: space-between;
}
.receipt-item-title {
    font-weight: bold;
    margin-top: 3px;
}
.receipt-item-details {
    padding-left: 8px;
}
.receipt-qr-code {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}
.receipt-qr-code canvas {
    width: 42mm;
    height: 42mm;
}
.receipt-footer {
    text-align: center;
    font-size: 9px;
    margin-top: 8px;
    line-height: 1.2;
}

/* --------------------------------------------------------------------------
   ENGINE 2: Standard Office Printer End-of-Day Clerk Sales Report (A4 size)
   -------------------------------------------------------------------------- */
@media print {
    body.print-mode-eod {
        width: 210mm;
    }

    body.print-mode-eod #app-container,
    body.print-mode-eod #keypad-modal,
    body.print-mode-eod #payment-modal,
    body.print-mode-eod #print-modal,
    body.print-mode-eod #clerk-modal,
    body.print-mode-eod #thermal-receipt {
        display: none !important;
    }

    body.print-mode-eod #eod-report {
        display: block !important;
        width: 190mm !important; /* Allow margins inside standard A4 */
        margin: 10mm auto !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
        font-size: 12px;
        line-height: 1.4;
    }
}

/* A4 Report Styles */
.report-title-section {
    text-align: center;
    border-bottom: 3px double #000000;
    padding-bottom: 8px;
    margin-bottom: 15px;
}
.report-meta-table {
    width: 100%;
    margin-bottom: 15px;
    border-collapse: collapse;
}
.report-meta-table td {
    padding: 3px 5px;
}
.report-grid-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    margin-bottom: 20px;
}
.report-grid-table th {
    background-color: #f3f4f6 !important;
    border: 1px solid #d1d5db;
    padding: 6px 8px;
    font-weight: bold;
    text-align: left;
}
.report-grid-table td {
    border: 1px solid #d1d5db;
    padding: 6px 8px;
}
.report-section-header {
    font-size: 14px;
    font-weight: bold;
    border-bottom: 1.5px solid #000000;
    padding-bottom: 3px;
    margin-top: 15px;
    margin-bottom: 8px;
}
.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}
.report-kpi-card {
    border: 1px solid #d1d5db;
    padding: 10px;
    border-radius: 6px;
    background-color: #f9fafb;
}
.report-kpi-val {
    font-size: 16px;
    font-weight: bold;
    color: #111827;
    margin-top: 4px;
}
.report-signature-block {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 40px;
    padding-top: 20px;
}
.signature-line {
    border-top: 1px solid #000000;
    margin-top: 35px;
    text-align: center;
    font-weight: 600;
}
