/* ==========================================================================
   Warung Nusa – gaya tambahan di luar Tailwind CDN
   ========================================================================== */

:root {
    color-scheme: light;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    overscroll-behavior-y: none;
}

/* Tombol lebih responsif di perangkat sentuh */
.tap {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.tap:active {
    transform: scale(0.985);
}

/* Scrollbar halus / disembunyikan */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

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

/* Latar titik untuk kartu hero */
.bg-dots {
    background-image: radial-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1px);
    background-size: 16px 16px;
}

/* Area aman untuk navigasi bawah iOS */
.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Fokus keyboard yang konsisten */
:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

/* SweetAlert2 mengikuti font aplikasi */
.swal2-popup {
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif !important;
    border-radius: 18px !important;
}

.swal2-title {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
}

.swal2-html-container,
.swal2-confirm,
.swal2-cancel {
    font-size: 0.82rem !important;
}

/* ==========================================================================
   Struk thermal
   ========================================================================== */

.receipt-paper {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.receipt-58 {
    width: 100%;
    max-width: 220px;
}

.receipt-80 {
    width: 100%;
    max-width: 310px;
}

.receipt-void {
    position: relative;
}

.receipt-void::after {
    content: "VOID";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: rgba(225, 29, 72, 0.16);
    transform: rotate(-18deg);
    pointer-events: none;
}

@media print {
    @page {
        size: auto;
        margin: 4mm;
    }

    html,
    body {
        background: #ffffff !important;
    }

    body * {
        visibility: hidden !important;
    }

    #receipt-paper,
    #receipt-paper * {
        visibility: visible !important;
    }

    #receipt-paper {
        position: absolute !important;
        inset: 0 auto auto 0 !important;
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .receipt-void::after {
        color: rgba(225, 29, 72, 0.24) !important;
    }
}

/* Animasi halus untuk kartu masuk */
.animate-fade-up {
    animation: fadeUp 0.45s ease-out both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
