
/* === Print Popup === */
/* Cart items to Print */
.print-popup-header {
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5vh;
    position: relative;
    text-align: center;
}
.print-popup-header .print-icon {
    height: 15vh;
}
.print-popup-header .print-title {
    font-size: 3.1vh;
    font-weight: 800;
    text-align: center;
}
.logo {
    display: flex;             /* enable flexbox */
    justify-content: center;   /* center horizontally */
    align-items: center;       /* center vertically if needed */
    margin-bottom: 0.5vh;       /* optional spacing below logo */
    margin-top: 0.5vh;
}

.logo img {
    width: 17vw;               /* your existing width */
    height: auto;              /* maintain aspect ratio */
}

#light-cart-items-to-print {
    background: #fff;
    padding: 0.7vh;
    border: solid 0.2vh #0A1C3A;
    overflow-y: auto;
    position: relative;
    left: 0;
    top: 0;
    width: 43vw; /* fits receipt printer */
    margin: 0 auto; /* center horizontally */
    font-family: Arial, sans-serif;
    font-size: 0.83vh;
    line-height: 0.93vh;
    text-align: right;
}

/* Each row */
.print-cart-row {
    margin-bottom: 0.4vh;
    padding: 0.2vh o.3vw;
}

/* Title: white text on black */
.print-cart-title {
    background: #0A1C3A !important;
    color: #fff;
    padding: 0.1vh 0.3vw;
    font-size: 0.93vh;
    font-weight: 400;
}

/* Type: black, bold */
.print-cart-type {
    color: #0A1C3A;
    font-size: 0.93vh;
    font-weight: 700;
    margin-top: 0.1vh;
}

/* Short explanation: normal text */
.print-cart-expl {
    margin-top: 0.1vh;
}

/* Print Footer */
.print-popup-footer {
    display: flex;
    flex-direction: column;   /* stack buttons vertically */
    align-items: center;      /* center them horizontally */
    margin-top: 2vh;          /* relative to screen height */
    gap: 1vh;                 /* space between buttons */
}

.print-continue-btn {
    display: inline-block;
    background: #fff;
    color: #0A1C3A;
    padding: 0.5vh 2vw;     /* scales with screen */
    border-radius: 5vh;       /* keeps pill shape */
    text-decoration: none;
    border: solid 0.2vh #0A1C3A;
    font-size: 1.3vh;         /* text scales with screen */
    font-weight: 700;
}

.print-continue-btn:hover {
    background: #C1B3D7;
}

@media print {
    @page {
        size: 72mm auto;
        margin: 0;
    }

    html, body {
        margin: 0 auto !important;
        padding: 0 !important;
        border: none !important;
        background: none !important;
        overflow: visible !important; /* prevent scrollbars */
    }

    /* Reset the popup overlay so it won't center */
    #print-popup {
        display: block !important;
        position: static !important;
        background: none !important;
        inset: auto !important;
    }

    #print-popup .popup-content {
        display: block !important;
        padding: 0 !important;
        margin: 0 auto !important;
        background: none !important;
        box-shadow: none !important;
    }

    /* Hide everything EXCEPT the receipt */    
    .top-bar,
    .page-container,
    #print-popup .print-popup-header,
    #print-popup .print-popup-footer 
    {
        visibility: hidden !important;
        display: none !important;
    }

    /* Then explicitly show the receipt container and its children */
    #light-cart-items-to-print,
    #light-cart-items-to-print * {
        display: block !important;
        visibility: visible !important;
    }

    #light-cart-items-to-print {
        background: #fff;
        padding: 0.7vh;
        position: relative;
        left: 0;
        top: 0;
        width: 68mm; /* fits receipt printer */
        margin: 0 auto; /* center horizontally */
        font-family: Arial, sans-serif;
        font-size: 0.83vh;
        line-height: 0.93vh !important;
        text-align: right;
        border: none !important;
        overflow: visible !important;
        /* border: solid 0.2vh #0A1C3A !important; */
    }

    .print-cart-title {
        background: #0A1C3A !important;
        color: #fff !important;
        font-weight: bold;
        margin-bottom: 0.3vh;
        -webkit-print-color-adjust: exact !important; /* Chrome / Edge */
        print-color-adjust: exact !important;        /* New standard */
    }

    #light-cart-items-to-print .logo {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-bottom: 0.5vh;
        margin-top: 0.5vh;
    }
}