/* ==========================================================================
   Cookies — souhlas & nastavení (GDPR / ePrivacy, Google Consent Mode v2)
   ========================================================================== */

/* ---- Lišta se souhlasem ---- */
#cookie-banner {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 9998;
    width: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    padding: 22px calc(50% - 560px);
    box-sizing: border-box;
    background: #090909;
    border-top: 1px solid #F7EF79;
    box-shadow: 0 -10px 30px rgba(9, 9, 9, .35);
    font-family: 'Manrope', sans-serif;
}

#cookie-banner.is-visible {
    display: flex;
    animation: cookie-banner-in .4s ease-out;
}

@keyframes cookie-banner-in {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.cookie-banner-text {
    flex: 1 1 420px;
    min-width: 260px;
    color: #f2f2f2;
}

.cookie-banner-text h2 {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 800;
    color: #f2f2f2;
}

.cookie-banner-text h2 span {
    color: #96A028;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #d3d3d3;
    font-weight: 300;
}

.cookie-banner-text a {
    color: #C5D333;
    text-decoration: 1px wavy underline #C5D33375;
}

.cookie-banner-text a:hover {
    color: #F7EF79;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---- Sdílené tlačítko ---- */
.cookie-btn {
    appearance: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: all .25s ease-in-out;
}

.cookie-btn--ghost {
    background: transparent;
    color: #d3d3d3;
    border: 1px solid rgba(242, 242, 242, .3);
}

.cookie-btn--ghost:hover {
    border-color: #96A028;
    color: #96A028;
}

.cookie-btn--secondary {
    background: #494949;
    color: #f2f2f2;
    border: 1px solid #494949;
}

.cookie-btn--secondary:hover {
    background: #C5D333;
    color: #090909;
    border-color: #C5D333;
}

.cookie-btn--primary {
    background: #96A028;
    color: #090909;
    border: 1px solid #96A028;
}

.cookie-btn--primary:hover {
    background: #F7EF79;
    border-color: #F7EF79;
}

/* ---- Modální nastavení ---- */
#cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(9, 9, 9, .78);
    font-family: 'Manrope', sans-serif;
}

#cookie-modal-overlay.is-visible {
    display: flex;
}

.cookie-modal {
    width: 100%;
    max-width: 560px;
    max-height: 86vh;
    overflow-y: auto;
    position: relative;
    padding: 34px;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid #090909;
    background: #151515;
    box-shadow: 0 10px 30px rgba(9, 9, 9, .5);
}

.cookie-modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 26px;
    height: 26px;
    border: none;
    background: none;
    color: #d3d3d3;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.cookie-modal-close:hover {
    color: #96A028;
}

.cookie-modal h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 800;
    color: #f2f2f2;
}

.cookie-modal h2 span {
    color: #96A028;
}

.cookie-modal > p {
    margin: 0 0 26px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #d3d3d3;
    font-weight: 300;
}

.cookie-modal > p a {
    color: #C5D333;
    text-decoration: 1px wavy underline #C5D33375;
}

.cookie-category {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid rgba(242, 242, 242, .12);
}

.cookie-category:first-of-type {
    border-top: none;
}

.cookie-category-info h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 800;
    color: #f2f2f2;
}

.cookie-category-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #aaa;
    font-weight: 300;
}

.cookie-category-locked {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #090909;
    background: #F7EF79;
    white-space: nowrap;
}

/* Přepínač */
.cookie-switch {
    flex: 0 0 auto;
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch-track {
    position: absolute;
    inset: 0;
    background: #494949;
    border-radius: 24px;
    cursor: pointer;
    transition: background .25s ease-in-out;
}

.cookie-switch-track::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f2f2f2;
    transition: transform .25s ease-in-out;
}

.cookie-switch input:checked + .cookie-switch-track {
    background: #96A028;
}

.cookie-switch input:checked + .cookie-switch-track::before {
    transform: translateX(20px);
}

.cookie-switch input:focus-visible + .cookie-switch-track {
    outline: 2px solid #C5D333;
    outline-offset: 2px;
}

.cookie-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 0 0;
}

.cookie-modal-actions .cookie-btn {
    flex: 1 1 auto;
    text-align: center;
}

/* ---- Odkaz ve footeru pro pozdější změnu souhlasu ---- */
.cookie-footer-link-pozice {
    width: 100%;
    margin: 14px 0 0 0;
    text-align: center;
}

a.cookie-footer-link {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .03em;
    color: #f2f2f2;
    text-decoration: 1px wavy underline rgba(242, 242, 242, .4);
    cursor: pointer;
}

a.cookie-footer-link:hover {
    color: #090909;
    text-decoration: 1px wavy underline #090909;
}

@media (max-width: 700px) {
    #cookie-banner {
        padding: 20px;
        justify-content: flex-start;
    }
    .cookie-banner-actions {
        width: 100%;
    }
    .cookie-banner-actions .cookie-btn {
        flex: 1 1 auto;
    }
}
