/* ==========================================================================
   Thông báo và đồng ý cookie (inc/cookie-consent.php, assets/js/ptk-cookie.js)
   ========================================================================== */
.ptk-cookie {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000; /* trên nút lên đầu trang (999) */
    display: flex;
    justify-content: center;
    pointer-events: none;
}
.ptk-cookie[hidden] {
    display: none;
}
.ptk-cookie__box {
    pointer-events: auto;
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title actions"
        "text actions";
    column-gap: 32px;
    row-gap: 6px;
    align-items: center;
    padding: 22px 28px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: #061153;
    color: #fff;
    box-shadow: 0 16px 48px rgba(5, 17, 83, .35);
    font-family: var(--body-font, inherit);
}
.ptk-cookie.is-expanded .ptk-cookie__box {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "title"
        "text"
        "prefs"
        "actions";
    max-width: 720px;
}
.ptk-cookie__title {
    grid-area: title;
    margin: 0;
    font-family: var(--title-font, inherit);
    font-size: 18px;
    font-weight: 600;
    line-height: 26px;
    color: #fff;
}
.ptk-cookie__text {
    grid-area: text;
    margin: 0;
    font-size: 15px;
    line-height: 24px;
    color: rgba(255, 255, 255, .82);
}
.ptk-cookie__text a {
    color: #6ea8ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ptk-cookie__prefs {
    grid-area: prefs;
    display: grid;
    gap: 10px;
    margin-top: 10px;
}
.ptk-cookie__prefs[hidden] {
    display: none;
}
.ptk-cookie__pref {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
}
.ptk-cookie__pref-text {
    margin: 0;
    cursor: default;
}
label.ptk-cookie__pref-text {
    cursor: pointer;
}
.ptk-cookie__pref-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    color: #fff;
}
.ptk-cookie__pref-desc {
    display: block;
    font-size: 14px;
    line-height: 21px;
    color: rgba(255, 255, 255, .72);
}
.ptk-cookie__always {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6ea8ff;
    white-space: nowrap;
}
/* style.css ẩn mọi checkbox (input[type="checkbox"] { display: none }): selector mạnh hơn để hiện công tắc */
.ptk-cookie input.ptk-cookie__switch {
    display: inline-block;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex-shrink: 0;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
    border-radius: 12px;
    background: rgba(255, 255, 255, .3);
    cursor: pointer;
    transition: background .2s ease;
}
.ptk-cookie input.ptk-cookie__switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}
.ptk-cookie input.ptk-cookie__switch:checked {
    background: #1053f3;
}
.ptk-cookie input.ptk-cookie__switch:checked::before {
    transform: translateX(20px);
}
.ptk-cookie__actions {
    grid-area: actions;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
.ptk-cookie.is-expanded .ptk-cookie__actions {
    margin-top: 6px;
}
.ptk-cookie__btn {
    min-height: 44px;
    padding: 0 22px;
    border: 1px solid #1053f3;
    border-radius: 999px;
    background: #1053f3;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.ptk-cookie__btn:hover {
    background: #2f6bff;
    border-color: #2f6bff;
}
.ptk-cookie__btn--ghost {
    border-color: rgba(255, 255, 255, .45);
    background: transparent;
}
.ptk-cookie__btn--ghost:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .08);
}
.ptk-cookie__btn--link {
    min-height: 44px;
    padding: 0 6px;
    border: 0;
    background: none;
    color: #fff;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ptk-cookie__btn--link:hover {
    background: none;
    color: #6ea8ff;
}
.ptk-cookie__btn[hidden] {
    display: none;
}
.ptk-cookie__btn:focus-visible,
.ptk-cookie input.ptk-cookie__switch:focus-visible,
.ptk-cookie__text a:focus-visible {
    outline: 2px solid #6ea8ff;
    outline-offset: 2px;
}

@media (max-width: 991px) {
    .ptk-cookie__box {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "title"
            "text"
            "prefs"
            "actions";
        max-width: 720px;
    }
    .ptk-cookie__actions {
        margin-top: 10px;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .ptk-cookie {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
    .ptk-cookie__box,
    .ptk-cookie.is-expanded .ptk-cookie__box {
        padding: 18px;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }
    .ptk-cookie__title {
        font-size: 17px;
        line-height: 24px;
    }
    .ptk-cookie__text {
        font-size: 14px;
        line-height: 22px;
    }
    .ptk-cookie__actions {
        margin-top: 8px;
        justify-content: stretch;
    }
    .ptk-cookie__btn {
        flex: 1 1 140px;
        padding: 0 16px;
    }
    .ptk-cookie__btn--link {
        flex: 1 1 100%;
        order: 3;
    }
}

/* Nút lên đầu trang không bị hộp cookie che */
.ptk-cookie-open .scrollToTop {
    visibility: hidden;
}

/* ==========================================================================
   Chân trang: các trang quy định, chính sách và mục "Cookie"
   Cách nhau bằng khoảng trắng, không dùng dấu ngăn cách.
   ========================================================================== */
.footer-section .footer-bottom .footer-policy {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 24px;
}
.footer-section .footer-bottom .footer-policy a {
    margin-right: 0;
}
.footer-section .footer-bottom .footer-policy a + a::before {
    display: none;
}
.footer-section .footer-bottom .footer-policy .ptk-cookie-link {
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    font: inherit;
    font-size: 15px;
    line-height: 1.66;
    cursor: pointer;
}
.footer-section .footer-bottom .footer-policy .ptk-cookie-link:hover,
.footer-section .footer-bottom .footer-policy .ptk-cookie-link:focus-visible {
    color: var(--ptk-hover-on-dark, #6ea8ff);
}
@media (max-width: 767px) {
    .footer-section .footer-bottom .footer-policy {
        justify-content: center;
    }
}
