/* Bill é¡µé¢ç§»åŠ¨ç«¯æ ·å¼ */

@media (max-width: 767.98px) {
    .bill-page .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .bill-page section {
        padding-top: 1rem !important;
        padding-bottom: 1.5rem !important;
    }
    .bill-page h4 {
        font-size: 1.15rem;
        padding-bottom: 0.75rem !important;
    }
    .bill-page .bg-body.rounded {
        padding: 1rem !important;
    }
    .bill-page .bg-body-tertiary.rounded {
        padding: 1rem !important;
    }
    .bill-page .sticky-top {
        position: static !important;
    }
    .bill-page .table.bill-order-table tbody tr {
        display: block;
        border-bottom: 1px solid var(--bs-border-color, #dee2e6);
        padding: 0.5rem 0;
    }
    .bill-page .table.bill-order-table tbody tr:last-child {
        border-bottom: 0;
    }
    .bill-page .table.bill-order-table tbody td {
        display: block;
        padding: 0.25rem 0;
        border: none;
    }
    .bill-page .table.bill-order-table tbody td:first-child {
        font-size: 0.8rem;
        color: var(--bs-secondary-color);
        padding-bottom: 0.15rem;
    }
    .bill-page .bill-detail-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
    }
    .bill-page .bill-detail-wrap .table {
        font-size: 0.85rem;
        min-width: 320px;
    }
    .bill-page .bill-detail-wrap .table th,
    .bill-page .bill-detail-wrap .table td {
        padding: 0.4rem 0.5rem;
        white-space: nowrap;
    }
    .bill-page .bill-detail-wrap .table td:first-child {
        white-space: normal;
        max-width: 140px;
    }
    .bill-page .btn-lg {
        padding: 0.75rem 1rem !important;
        font-size: 1rem;
    }
}

/* Cart é¡µé¢ç§»åŠ¨ç«¯æ ·å¼ */

@media (max-width: 767.98px) {
    .cart-page.content .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .cart-page .breadcrumb {
        padding-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        font-size: 0.875rem;
    }
    .cart-page section.pb-4 {
        padding-bottom: 1.5rem !important;
    }
    .cart-page h1.h4 {
        font-size: 1.15rem;
        margin-bottom: 1rem !important;
    }
    .cart-page .cart-mobile-item .count-input input {
        font-size: 0.9rem;
    }
    .cart-page .cart-mobile-item .btn-outline-danger {
        font-size: 1.1rem;
        min-width: 2rem;
    }
    .cart-page #cart-checkout-form .form-label {
        font-size: 0.9rem;
    }
    .cart-page #cart-checkout-form .form-control {
        font-size: 0.95rem;
    }
    .cart-page #cart-checkout-form .btn-lg {
        padding: 0.75rem 1rem !important;
        font-size: 1rem;
    }
    .cart-page section .col-lg-4 .sticky-top {
        position: static !important;
    }
}

/* æ‰¾å›žå¯†ç é¡µ / é€šç”¨æç¤ºå¼¹çª—ï¼ˆ.modal-overlayï¼‰ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px 24px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 28px;
}

.modal-icon.success {
    background: #d4edda;
    color: #28a745;
}

.modal-icon.error {
    background: #f8d7da;
    color: #dc3545;
}

.modal-icon.info {
    background: #d1ecf1;
    color: #17a2b8;
}

.modal-msg {
    font-size: 15px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-btn {
    display: inline-block;
    padding: 8px 32px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    color: #fff;
    background: #212529;
}

.modal-btn:hover {
    opacity: 0.85;
}

/* åˆ†ç«™è®¢å• user/subsite/orders ç§»åŠ¨ç«¯æ ·å¼ */

@media (max-width: 767.98px) {
    .subsite-orders-page .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .subsite-orders-page section {
        padding-top: 1rem !important;
        padding-bottom: 1.5rem !important;
    }
    .subsite-orders-page h4 {
        font-size: 1.15rem;
    }
    .subsite-orders-page .bg-body.rounded .p-4 {
        padding: 1rem !important;
    }
    .subsite-orders-page .table-responsive.subsite-orders-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .subsite-orders-page .subsite-orders-table {
        font-size: 0.8rem;
        min-width: 680px;
    }
    .subsite-orders-page .subsite-orders-table thead th,
    .subsite-orders-page .subsite-orders-table tbody td {
        padding: 0.5rem 0.4rem;
        white-space: nowrap;
    }
    .subsite-orders-page .subsite-orders-table tbody td:nth-child(2) {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .subsite-orders-page .subsite-orders-table tbody td:nth-child(3) {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .subsite-orders-page .subsite-orders-table .btn-sm {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    .subsite-orders-page .subsite-orders-table .badge {
        font-size: 0.7rem;
    }
    .subsite-orders-page .subsite-order-detail-inner {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .subsite-orders-page .subsite-order-detail-inner .table {
        font-size: 0.8rem;
        min-width: 260px;
    }
    .subsite-orders-page .subsite-order-detail-inner .table th,
    .subsite-orders-page .subsite-order-detail-inner .table td {
        padding: 0.35rem 0.4rem;
    }
    .subsite-orders-page .mt-3 {
        margin-top: 1rem !important;
    }
}

/* Mobile dark mode fixes */

@media (max-width: 767.98px) {
    [data-bs-theme="dark"] body,
    [data-bs-theme="dark"] .content-wrapper {
        background-color: var(--cz-dark-bg, var(--bs-body-bg, #1a1d21)) !important;
        color: var(--cz-dark-color, var(--bs-body-color, #e1e4e8)) !important;
    }

    [data-bs-theme="dark"] .bg-body {
        background-color: var(--bs-body-bg) !important;
    }

    [data-bs-theme="dark"] .bg-body-tertiary {
        background-color: var(--bs-tertiary-bg) !important;
    }

    [data-bs-theme="dark"] .navbar {
        background-color: var(--bs-body-bg) !important;
    }

    [data-bs-theme="dark"] .card,
    [data-bs-theme="dark"] .modal-content {
        background-color: var(--bs-body-bg, #181d25) !important;
        color: var(--bs-body-color, #e1e4e8) !important;
    }

    [data-bs-theme="dark"] .modal-backdrop {
        background-color: rgba(0, 0, 0, 0.6) !important;
        opacity: 1 !important;
    }

    [data-bs-theme="dark"] .modal-header,
    [data-bs-theme="dark"] .modal-footer {
        background-color: var(--bs-body-bg, #181d25) !important;
        border-color: var(--bs-border-color, #333d4c) !important;
    }

    [data-bs-theme="dark"] .modal-body {
        background-color: var(--bs-body-bg, #181d25) !important;
    }

    [data-bs-theme="dark"] #mobileBottomNav {
        background-color: var(--bs-body-bg, #181d25) !important;
        border-color: var(--bs-border-color, #333d4c) !important;
    }

    [data-bs-theme="dark"] .modal-box {
        background: var(--bs-body-bg, #181d25) !important;
        color: var(--bs-body-color, #e1e4e8) !important;
    }

    [data-bs-theme="dark"] .modal-msg {
        color: var(--bs-body-color, #e1e4e8) !important;
    }

    [data-bs-theme="dark"] .offcanvas {
        background-color: var(--bs-body-bg, #181d25) !important;
        color: var(--bs-body-color, #e1e4e8) !important;
    }

    [data-bs-theme="dark"] .border,
    [data-bs-theme="dark"] .border-bottom,
    [data-bs-theme="dark"] .border-top {
        border-color: var(--bs-border-color) !important;
    }
}