/* UuViet Cookie Consent - màu thương hiệu #f9a31a / #3d2b1f (mobile-first) */
:root {
    --cc-orange: #f9a31a;
    --cc-orange-dark: #df8500;
    --cc-brown: #3d2b1f;
    --cc-text: #29231f;
    --cc-muted: #716a65;
    --cc-border: #eadfd4;
    --cc-surface: #fff;
    --cc-soft: #fff8ef;
}

[hidden] {
    display: none !important;
}

/* ===== Banner (mobile mặc định) ===== */
.cc-banner {
    position: fixed;
    z-index: 99990;
    left: 10px;
    right: 10px;
    bottom: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    color: var(--cc-text);
    background: rgba(255,255,255,.98);
    border: 1px solid var(--cc-border);
    border-bottom: 4px solid var(--cc-orange);
    border-radius: 18px;
    box-shadow: 0 12px 42px rgba(61,43,31,.18);
    font-family: inherit;
}

.cc-cookie-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .cc-cookie-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

.cc-banner-copy {
    flex: 1;
    min-width: 0;
    padding-right: 24px;
}
    /* chừa chỗ cho nút đóng */
    .cc-banner-copy strong {
        display: block;
        color: var(--cc-brown);
        font-size: 14px;
        margin-bottom: 4px;
    }

    .cc-banner-copy p {
        margin: 0;
        color: #5f5852;
        font-size: 12px;
        line-height: 1.55;
    }

.cc-text-button {
    border: 0;
    padding: 0;
    background: none;
    color: #b66b00;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

.cc-banner-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.cc-btn {
    min-height: 44px;
    padding: 10px 7px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: .18s ease;
}

    .cc-btn:focus-visible, .cc-close:focus-visible, .cc-modal-close:focus-visible,
    .cc-reopen:focus-visible {
        outline: 3px solid rgba(249,161,26,.4);
        outline-offset: 2px;
    }

.cc-btn-outline {
    color: var(--cc-brown);
    background: #fff;
    border-color: var(--cc-brown);
}

    .cc-btn-outline:hover {
        background: var(--cc-soft);
    }

.cc-btn-customize {
    border-color: var(--cc-orange);
}

.cc-btn-primary {
    color: #fff;
    background: var(--cc-orange);
    border-color: var(--cc-orange);
}

    .cc-btn-primary:hover {
        background: var(--cc-orange-dark);
        border-color: var(--cc-orange-dark);
    }

.cc-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #625950;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

/* ===== Modal (mobile mặc định) ===== */
.cc-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 12px;
    background: rgba(35,25,19,.48);
    backdrop-filter: blur(3px);
}

.cc-modal {
    position: relative;
    width: min(590px, 100%);
    max-height: min(92vh, 780px);
    overflow: auto;
    padding: 24px 17px 18px;
    border-radius: 18px;
    background: var(--cc-surface);
    color: var(--cc-text);
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
    font-family: inherit;
}

.cc-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: 0;
    background: none;
    font-size: 28px;
    color: #655d57;
    cursor: pointer;
}

.cc-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cc-brown);
    font-weight: 800;
    font-size: 17px;
}

.cc-modal h2 {
    margin: 13px 34px 8px 0;
    color: #1f1b18;
    font-size: 21px;
}

.cc-intro {
    margin: 0 0 17px;
    color: #5f5852;
    font-size: 14px;
    line-height: 1.6;
}

.cc-option {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 9px 0;
    padding: 11px 9px;
    border: 1px solid #f0e9e3;
    border-radius: 16px;
    background: #fbfaf9;
}

.cc-option-icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    flex: 0 0 35px;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 800;
}

.cc-icon-essential {
    color: #14965a;
    background: #e8f7ef;
}

.cc-icon-analytics {
    color: #df8a12;
    background: #fff0d9;
}

.cc-icon-marketing {
    color: #c46a19;
    background: #fff0e4;
}

.cc-option-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .cc-option-copy strong {
        color: #26211d;
        font-size: 14px;
    }

    .cc-option-copy span {
        color: var(--cc-muted);
        font-size: 11px;
        line-height: 1.4;
    }

.cc-always-on {
    padding: 8px 12px;
    border-radius: 999px;
    background: #efedef;
    color: #625c60;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.cc-switch {
    appearance: none;
    width: 48px;
    height: 27px;
    border-radius: 99px;
    background: #c9c6c4;
    position: relative;
    cursor: pointer;
    flex: 0 0 48px;
    transition: .2s;
}

    .cc-switch::after {
        content: "";
        position: absolute;
        top: 3px;
        left: 3px;
        width: 21px;
        height: 21px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 3px #0002;
        transition: .2s;
    }

    .cc-switch:checked {
        background: var(--cc-orange);
    }

        .cc-switch:checked::after {
            transform: translateX(21px);
        }

    .cc-switch:focus-visible {
        outline: 3px solid #f9a31a66;
        outline-offset: 3px;
    }

.cc-policy-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0 17px;
    padding: 12px 2px;
    border-top: 1px solid var(--cc-border);
    color: var(--cc-brown);
    text-decoration: none;
    font-size: 13px;
}

    .cc-policy-link span {
        font-size: 24px;
        color: #8b8179;
    }

.cc-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

    .cc-modal-actions .cc-btn {
        flex: 1;
        min-width: 30%;
        padding-left: 10px;
        padding-right: 10px;
    }

.cc-footnote {
    margin: 13px 0 0;
    color: #827a73;
    font-size: 11px;
    line-height: 1.5;
}

/* ===== Nút mở lại cài đặt ===== */
.cc-reopen {
    position: fixed;
    z-index: 99980;
    left: 12px;
    bottom: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid var(--cc-orange);
    border-radius: 999px;
    background: #fff;
    color: var(--cc-brown);
    box-shadow: 0 4px 18px #0002;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== Tablet / Desktop (từ 761px) ===== */
@media (min-width: 761px) {
    .cc-banner {
        left: 20px;
        right: 20px;
        bottom: 18px;
        flex-wrap: nowrap;
        align-items: center;
        gap: 18px;
        padding: 17px 22px;
    }

    .cc-cookie-icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .cc-banner-copy {
        min-width: 220px;
        padding-right: 0;
    }

        .cc-banner-copy strong {
            font-size: 16px;
        }

        .cc-banner-copy p {
            font-size: 13px;
        }

    .cc-banner-actions {
        width: auto;
        display: flex;
        align-items: center;
        gap: 9px;
        flex-shrink: 0;
    }

    .cc-btn {
        min-height: 42px;
        padding: 10px 19px;
        font-size: 14px;
    }

    .cc-close {
        position: static;
        width: auto;
        height: auto;
        align-self: flex-start;
        padding: 0 0 0 3px;
    }

    .cc-modal-backdrop {
        padding: 20px;
    }

    .cc-modal {
        padding: 28px 30px 22px;
        border-radius: 22px;
    }

    .cc-modal-close {
        top: 16px;
        right: 19px;
        width: auto;
        height: auto;
    }

    .cc-modal h2 {
        font-size: 24px;
    }

    .cc-option {
        gap: 13px;
        padding: 13px 14px;
    }

    .cc-option-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .cc-option-copy span {
        font-size: 12px;
    }

    .cc-modal-actions {
        flex-wrap: nowrap;
    }

        .cc-modal-actions .cc-btn {
            min-width: 0;
            font-size: 14px;
        }

    .cc-reopen {
        left: 16px;
        bottom: 16px;
        min-height: 0;
    }
}
.cc-brand-mark {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .cc-brand-mark img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }