/* Tailwind-first app styles: this file only keeps non-utility needs */

.toast {
    transition: opacity .25s ease, transform .25s ease;
}

.app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 60;
    height: 100vh;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform .28s ease;
    overflow-y: auto;
}

body.sidebar-open {
    overflow: hidden;
}

body.sidebar-open .app-sidebar {
    transform: translateX(0);
}

body.sidebar-open #sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

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

#qrcode img,
#qrcode canvas {
    width: 100% !important;
    height: 100% !important;
}

.watermark {
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.receipt-watermark-cloud {
    overflow: hidden;
}

.receipt-watermark-cloud .wm {
    position: absolute;
    font-family: 'Sora', 'Plus Jakarta Sans', ui-sans-serif, system-ui;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(51, 65, 85, .14);
    text-shadow: none;
    line-height: 1;
}

.receipt-watermark-cloud .wm-a {
    top: 7%;
    left: -6%;
    font-size: clamp(28px, 8vw, 68px);
    transform: rotate(-26deg);
}

.receipt-watermark-cloud .wm-b {
    top: 19%;
    right: -8%;
    font-size: clamp(26px, 7.5vw, 60px);
    transform: rotate(22deg);
}

.receipt-watermark-cloud .wm-c {
    top: 39%;
    left: 18%;
    font-size: clamp(24px, 7vw, 58px);
    transform: rotate(-14deg);
}

.receipt-watermark-cloud .wm-d {
    bottom: 31%;
    left: -11%;
    font-size: clamp(30px, 8.3vw, 72px);
    transform: rotate(25deg);
}

.receipt-watermark-cloud .wm-e {
    bottom: 16%;
    right: -6%;
    font-size: clamp(28px, 8vw, 66px);
    transform: rotate(-24deg);
}

.receipt-watermark-cloud .wm-f {
    bottom: 4%;
    left: 26%;
    font-size: clamp(24px, 7.2vw, 58px);
    transform: rotate(18deg);
}

.section-reveal {
    animation: sectionRise .44s ease both;
}

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

.thermal-mode .receipt-card {
    width: 80mm !important;
    max-width: 80mm !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 8px !important;
}

.thermal-mode .receipt-card * {
    font-size: 11px !important;
    line-height: 1.35 !important;
}

.thermal-mode .receipt-card h1 {
    font-size: 16px !important;
}

.thermal-mode .receipt-watermark-cloud .wm {
    color: rgba(15, 23, 42, .16) !important;
    letter-spacing: .22em !important;
}

@media (min-width: 1024px) {
    .app-sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
        width: 100%;
        transform: none !important;
    }

    #sidebar-backdrop {
        display: none;
    }

    body.sidebar-open {
        overflow-y: auto;
    }

    body.sidebar-compact #app-shell {
        grid-template-columns: 96px minmax(0, 1fr) !important;
    }

    body.sidebar-compact .sidebar-brand-copy,
    body.sidebar-compact .sidebar-user-box,
    body.sidebar-compact .sidebar-label {
        display: none !important;
    }

    body.sidebar-compact .sidebar-link {
        justify-content: center !important;
        padding-left: .4rem !important;
        padding-right: .4rem !important;
    }
}

@media (max-width: 767px) {
    .table-dense {
        font-size: .77rem !important;
    }

    .table-dense thead th,
    .table-dense tbody td {
        padding: .56rem .6rem !important;
        line-height: 1.24;
        white-space: nowrap;
    }

    .table-dense thead th {
        font-size: .68rem;
        letter-spacing: .01em;
    }

    .table-dense td .inline-flex {
        white-space: nowrap;
    }
}

@media print {
    .no-print {
        display: none !important;
    }

    body,
    .receipt-page {
        background: #fff !important;
        margin: 0;
        padding: 0;
    }

    .receipt-card {
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        max-width: none !important;
        width: 100% !important;
        page-break-inside: avoid;
    }

    .thermal-mode .receipt-card {
        width: 80mm !important;
        max-width: 80mm !important;
        margin: 0 auto;
    }

    .thermal-mode .receipt-card * {
        font-size: 11px !important;
        line-height: 1.3 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast,
    .app-sidebar,
    .section-reveal {
        transition: none !important;
        animation: none !important;
    }
}
