﻿
/* =====================================================
   BASE GLOBAL
===================================================== */

html, body {
    font-family: 'Alexandria', sans-serif;
    margin: 0;
    padding: 0;
    font-weight: 400;
    font-size: 11px;
    color: #231F20;
    background: #fbf6eb;
    overscroll-behavior: auto;
}


h1, h2, h3 {
    font-weight: 700;
}

.btn,
.table th {
    font-weight: 500;
}


.small,
.helper-text {
    font-weight: 300;
}






h1:focus {
    outline: 2px solid #c9a24d;
}




a, .btn-link {
    color: #c9a24d;
    text-decoration: none;
}

/* =====================================================
   BUTTONS
===================================================== */

.btn-primary {
    background: #F9D78A;
    color: #231F20;
    border: 1.5px solid #231F20;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: 0.25s ease;
}

    .btn-primary:hover,
    .btn-primary:focus {
        background: linear-gradient( 90deg, #F3CE7A, #F9D78A, #F3CE7A );
        border-color: #231F20;
        color: #231F20;
        box-shadow: 0 6px 14px rgba(0,0,0,0.22);
        transform: translateY(-1px);
    }

.btn:focus,
.form-control:focus,
.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(201,162,77,0.35);
}

/* =====================================================
   FORM VALIDATION
===================================================== */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #7aa874;
}

.invalid {
    outline: 1px solid #c94d4d;
}

.validation-message {
    color: #c94d4d;
}

/* =====================================================
   LAYOUT
===================================================== */

.content {
    padding-top: 0.9rem;
}

/* =====================================================
   ERROR MESSAGE BAR
===================================================== */

#blazor-error-ui {
    background: #fbf6eb;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.55rem 1rem;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    color: #2b2b2b;
    border-top: 1px solid #e6d3a3;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.6rem;
        top: 0.4rem;
    }

/* =====================================================
   LOADING INDICATOR
===================================================== */

.loading-container {
    height: 70vh;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.loading-logo {
    width: 110px;
    opacity: .85;
    animation: pulse 1.4s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: .85;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: .85;
    }
}

/* Small Dial Loading */

.loading-progress {
    position: absolute;
    width: 7rem;
    height: 7rem;
    inset: 18vh 0 auto 0;
    margin: 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e6d3a3;
        stroke-width: 0.5rem;
        transform: rotate(-90deg);
        transform-origin: 50% 50%;
    }

        .loading-progress circle:last-child {
            stroke: #c9a24d;
        }

.loading-progress-text {
    position: absolute;
    inset: calc(18vh + 2.8rem) 0 auto 0.2rem;
    text-align: center;
    font-weight: bold;
    font-size: .9rem;
    color: #2b2b2b;
}

/* =====================================================
   CODE BLOCKS
===================================================== */

code {
    color: #8c6b1f;
}

/* =====================================================
   FLOATING PLACEHOLDERS
===================================================== */

.form-floating > .form-control::placeholder {
    color: #9a9a9a;
    text-align: end;
}

.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =====================================================
   TABLE HEADERS
===================================================== */

.table thead.table-dark th {
    background: #F9D78A !important;
    color: #231F20;
}

/* =====================================================
   NOTIFICATION SHAKE
===================================================== */

.notif-shake {
    animation: shake 0.7s;
}

@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }

    75% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* =====================================================
   SCROLL TO TOP BUTTON
===================================================== */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background: #F9D78A;
    color: #231F20;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    transition: 0.25s;
    z-index: 999999 !important;
}




    .scroll-to-top:hover {
        background: #E6C06A;
        color: #231F20;
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    }







/* =====================================================
   MOBILE OPTIMIZATION
===================================================== */

@media (max-width: 600px) {

    body {
        font-size: 0.82rem;
    }

    .btn-primary {
        padding: 0.4rem 0.7rem;
        font-size: 0.78rem;
        border-radius: 8px;
    }

    .loading-logo {
        width: 95px;
    }

    .scroll-to-top {
        bottom: 62px;
        right: 20px;
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    #blazor-error-ui {
        font-size: 0.8rem;
        padding: 0.45rem 0.8rem;
    }
}

/* =====================================================
   VOLUME POPOVER
===================================================== */

.volume-popover {
    position: absolute;
    bottom: -42px;
    right: 0;
    background: #ffffff;
    padding: 6px 10px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    display: none;
    z-index: 2000;
}

.nav-item:hover .volume-popover {
    display: block;
}

.volume-popover input[type="range"] {
    width: 100px;
}



.volume-percent {
    font-size: 10px;
    font-weight: 600;
    min-width: 35px;
    text-align: center;
    color: #6b7280;
}


.volume-low {
    color: #dc2626;
}
/* أحمر */
.volume-mid {
    color: #f59e0b;
}
/* برتقالي */
.volume-high {
    color: #16a34a;
}
/* أخضر */








/* =====================================================
   PRINT STYLES (UNCHANGED)
===================================================== */
@media print {
    body * {
        visibility: hidden !important;
    }

    #print-container,
    #print-container * {
        visibility: visible !important;
    }

    .print-header, .print-header *,
    .receipt-section, .receipt-section * {
        visibility: visible !important;
    }

    .print-header {
        position: absolute;
        top: 0;
        width: 100%;
        text-align: center;
        padding: 10px;
    }

    .receipt-section {
        position: absolute;
        top: 180px;
        width: 100%;
        padding: 10px 20px;
    }

    nav, header, footer, .btn, .no-print {
        display: none !important;
    }

    table {
        width: 100%;
        font-size: 13px;
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 5px;
    }
}





/* =========================
   PRINT – DELIVERY LABEL
   ========================= */

/* Hide on screen */
#labels-print-area {
    display: none;
}

@media print {

    @page {
        size: A4;
        margin: 15mm;
    }

    /* Hide page UI here*/
    .delivery-scope {
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Show ONLY label area */
    #labels-print-area,
    #labels-print-area * {
        display: block !important;
        visibility: visible !important;
    }

    /* Label container */
    .delivery-label {
        page-break-after: always;
        border: 2px solid #000;
        padding: 20px;
        box-sizing: border-box;
        width: 100%;
        margin-bottom: 20px;
    }

        .delivery-label:last-child {
            page-break-after: auto;
        }

        /* Header */
        .delivery-label h4 {
            text-align: center;
            font-size: 18px;
            margin-bottom: 12px;
            border-bottom: 2px solid #000;
            padding-bottom: 6px;
        }

        /* Text */
        .delivery-label p {
            font-size: 14px;
            margin: 6px 0;
        }

        /* Table */
        .delivery-label table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
            page-break-inside: avoid;
        }

        .delivery-label th,
        .delivery-label td {
            border: 1px solid #000;
            padding: 6px;
            text-align: center;
        }

            .delivery-label td:first-child {
                text-align: right;
            }

    /* Total */
    .label-total {
        margin-top: 15px;
        border-top: 2px dashed #000;
        padding-top: 8px;
        font-size: 15px;
        font-weight: bold;
    }

    /* Footer */
    .label-footer {
        margin-top: 20px;
        text-align: center;
        font-size: 12px;
    }

    /* Hide buttons, nav, etc */
    nav, header, footer, .btn, .no-print {
        display: none !important;
    }
}



@media print {
    body * {
        visibility: hidden !important;
    }

    #print-area,
    #print-area * {
        visibility: visible !important;
    }

    #print-area {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
    }

    nav, header, footer, .btn, .no-print {
        display: none !important;
    }
}










/* =====================================================
   GLOBAL PRINT RULES – ALL PAGES
===================================================== */
@media print {

    /* Hide all page content first */
    body * {
        visibility: hidden !important;
    }

    /* ======== RECEIPT PAGES ======== */
    #print-container,
    #print-container * {
        visibility: visible !important;
    }

    .print-header,
    .print-header *,
    .receipt-section,
    .receipt-section * {
        visibility: visible !important;
    }

    .print-header {
        position: absolute;
        top: 0;
        width: 100%;
        text-align: center;
        padding: 10px;
    }

    .receipt-section {
        position: absolute;
        top: 180px;
        width: 100%;
        padding: 10px 20px;
    }

    /* ======== DELIVERY LABELS ======== */
    #labels-print-area,
    #labels-print-area * {
        display: block !important;
        visibility: visible !important;
    }

    /* ======== STOCK USAGE PAGE ======== */
    #print-area,
    #print-area * {
        visibility: visible !important;
    }

    #print-area {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
    }

    /* Remove UI elements */
    nav, header, footer, .btn, .no-print {
        display: none !important;
    }

    /* Table formatting */
    table {
        width: 100%;
        font-size: 13px;
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 5px;
    }
}















.install-banner {
    position: sticky;
    top: 64px; /* تحت الهيدر */
    z-index: 1050;
    background: #F9D78A;
    color: #231F20;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

    .install-banner small {
        display: block;
        font-size: 12px;
        opacity: 0.9;
    }

.banner-actions button {
    border-radius: 20px;
}


/* 🔥 Blazored Toast — FORCE TOP MOST */
.blazored-toast-container {
    position: fixed !important;
    z-index: 99999 !important;
}