/* ===== Popup (modal) ===== */
.custom-model-main {
    text-align: center;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    -webkit-overflow-scrolling: touch;
    outline: 0;
    opacity: 0;
    transition: opacity 0.15s linear, z-index 0.15s;
    z-index: -1;
    overflow-x: hidden;
    overflow-y: auto;
}

.model-open {
    z-index: 99999;
    opacity: 1;
    overflow: hidden;
}

.custom-model-inner {
    transform: translate(0, -25%);
    transition: transform 0.3s ease-out;
    display: inline-block;
    vertical-align: middle;
    width: 600px;
    margin: 30px auto;
    max-width: 97%;
}

.custom-model-wrap {
    display: block;
    width: 100%;
    position: relative;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
    background-clip: padding-box;
    outline: 0;
    text-align: left;
    padding: 30px;
    box-sizing: border-box;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

.model-open .custom-model-inner {
    transform: translate(0, 0);
    position: relative;
    z-index: 999;
    display: flex;
    align-items: center;
    height: 100%;
}

.bg-overlay {
    background: rgba(0, 0, 0, 0);
    height: 100vh;
    width: 100%;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    transition: background 0.15s linear;
}

.model-open .bg-overlay {
    background: rgba(2, 20, 8, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 99;
}


/* ===== Form đặt hàng & popup thành công (luxury theme) ===== */
main .custom-model-main .custom-model-wrap {
    background: linear-gradient(160deg, #0f4d27 0%, #08301a 100%);
    border: 1px solid rgba(230, 190, 90, 0.55);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 28px 40px 18px;
    color: #fff;
}

/* đường kẻ vàng mảnh phía trên */
main .custom-model-main .custom-model-wrap::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f0d27a, transparent);
}

main .custom-model-main .form-container .title-form {
    color: #f0d27a;
    letter-spacing: 2px;
    font-weight: 700;
    padding: 2rem 0 1rem;
}

main .custom-model-main .form-container form {
    padding-top: 1rem;
}

main .custom-model-main .form-container form .form-group input {
    height: auto;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(240, 210, 122, 0.28);
    border-radius: 12px;
    padding: 1.3rem 1rem 1.3rem 4.5rem;
    transition: border-color .25s, box-shadow .25s, background .25s;
}

main .custom-model-main .form-container form .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

main .custom-model-main .form-container form .form-group input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #f0d27a;
    box-shadow: 0 0 0 3px rgba(240, 210, 122, 0.18);
}

main .custom-model-main .form-container form .form-group i {
    color: #f0d27a;
    left: 6px;
}

main .custom-model-main .form-container .btn-form {
    color: #3b2a00;
    background: linear-gradient(135deg, #f7e29a 0%, #d9a92f 100%);
    border: 0;
    border-radius: 12px;
    letter-spacing: 1.5px;
    box-shadow: 0 8px 22px rgba(217, 169, 47, 0.35);
    transition: transform .2s, box-shadow .2s;
}

main .custom-model-main .form-container .btn-form:hover {
    background: linear-gradient(135deg, #fff0b8 0%, #e5b63a 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(217, 169, 47, 0.5);
}

main .custom-model-main .form-container .notification-form {
    padding: 2rem 0 0;
}

main .custom-model-main .form-container .notification-form img {
    width: 120px;
    filter: drop-shadow(0 0 18px rgba(240, 210, 122, 0.55));
}

main .custom-model-main .form-container .notification-form .title-form {
    color: #fff;
    letter-spacing: 1px;
    padding: 2rem 0 0;
}

/* nút đóng (X) */
main .custom-model-main .btn-x {
    display: flex;
    align-items: center;
    justify-content: center;
    right: 16px;
    top: 16px;
    width: 34px;
    height: 34px;
    padding: 0;
    line-height: 1;
    border: 1px solid rgba(240, 210, 122, 0.5);
    border-radius: 50%;
    background: transparent;
    color: #f0d27a;
    transition: transform .25s, background .25s;
}

main .custom-model-main .btn-x:hover {
    background: #f0d27a;
    color: #08301a;
    transform: rotate(90deg);
}

main .custom-model-main .btn-x i {
    display: block;
    margin: 0;
    font-size: 16px;
    line-height: 1;
}


/* ===== Bảng danh sách khách hàng ===== */
/* Nổi đè lên, không đẩy các phần tử khác */
main .all-height .box-content-btn-list {
    position: relative;
    width: 100%;
}

main .all-height .box-content-btn-list .box-content-table {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0.8rem auto 0;
    z-index: 20;
}

/* Dòng "Danh sách trống": nền trắng, chiều cao vừa nội dung */
main .all-height .box-content-table table tbody tr.empty-row,
main .all-height .box-content-table table tbody tr.empty-row td {
    background-color: #fff !important;
}

main .all-height .box-content-table table tbody tr.empty-row td {
    text-align: center;
    padding: 28px 12px;
    color: #6b7d6e;
    font-style: italic;
}

main .all-height .box-content-btn-list .box-content-table:has(.empty-row) {
    height: auto !important;
}

/* Thanh cuộn */
main .all-height .box-content-table {
    scrollbar-width: thin;
    scrollbar-color: #d9a92f transparent;
}

main .all-height .box-content-table::-webkit-scrollbar {
    width: 8px;
}

main .all-height .box-content-table::-webkit-scrollbar-track {
    background: transparent;
    margin: 44px 0 10px;
}

main .all-height .box-content-table::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f7e29a, #d9a92f);
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.95);
}

main .all-height .box-content-table::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffe98a, #c8961a);
}


/* ===== PC (từ 1024px) ===== */
@media (min-width: 1024px) {
    html {
        width: 100%;
    }

    body {
        overflow-x: hidden;
    }

    main .all-height .box-content-dathang .btn-site {
        padding: calc(0rem + 6.4 * var(--scaler1)) calc(0rem + 37 * var(--scaler1));
        font-size: calc(0px + 19.2 * var(--scaler1));
    }

    main .all-height .box-content-dathang .btn-site .text img {
        width: calc(19px + 11 * var(--scaler1));
    }

    main .all-height .box-content-btn-list .btn-list {
        padding: calc(0rem + 8 * var(--scaler1)) calc(0rem + 32 * var(--scaler1));
        font-size: calc(0px + 16 * var(--scaler1));
    }

    main .all-height .box-content-btn-list .btn-list svg {
        width: calc(0px + 23 * var(--scaler1));
        height: auto;
        margin-left: calc(0rem + 8 * var(--scaler1));
    }

    /* bảng cao tối đa vừa khít màn hình, dài hơn thì cuộn trong khung */
    main .all-height .box-content-btn-list .box-content-table {
        max-height: min(calc(0px + 400 * var(--scaler1)), calc(59vh - 190px));
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}
