.cookie-consent-banner[hidden]{
    display: none !important;
}

.cookie-consent-banner{
    position: fixed;
    right: 20px;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    width: min(1180px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 22px 24px;
    border: 1px solid var(--surface-soft);
    border-radius: 18px;
    background: var(--surface-deep);
    color: var(--text-on-dark);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.cookie-consent-copy{
    min-width: 0;
}

.cookie-consent-copy strong{
    display: block;
    margin-bottom: 5px;
    color: var(--text-on-dark-strong);
    font-size: 19px;
    line-height: 1.2;
}

.cookie-consent-copy p{
    max-width: 720px;
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.cookie-consent-copy a,
.cookie-preferences-dialog a{
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-consent-actions{
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.cookie-consent-button{
    min-height: 44px;
    border: 1px solid var(--surface-soft);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.cookie-consent-button:hover{
    transform: translateY(-1px);
}

.cookie-consent-button:focus-visible,
.cookie-preferences-close:focus-visible,
.footer-cookie-settings:focus-visible{
    outline: 3px solid var(--surface-soft);
    outline-offset: 3px;
}

.cookie-consent-button:disabled{
    cursor: wait;
    opacity: 0.62;
    transform: none;
}

.cookie-consent-button--primary{
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: var(--surface-white);
}

.cookie-consent-button--secondary{
    background: transparent;
    color: var(--text-on-dark);
}

.cookie-consent-button--secondary:hover{
    background: var(--surface-deep-muted);
}

.cookie-consent-status{
    min-height: 0;
    margin-top: 6px !important;
    color: #FFD6D6;
    font-weight: 600;
}

.cookie-consent-status:empty{
    display: none;
}

.cookie-preferences-dialog{
    width: min(680px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 20px;
    background: var(--surface-light);
    color: var(--text-on-light);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.cookie-preferences-dialog::backdrop{
    background: rgba(11, 16, 24, 0.76);
    backdrop-filter: blur(3px);
}

.cookie-preferences-form{
    display: grid;
    gap: 18px;
    padding: 28px;
}

.cookie-preferences-form > p{
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
}

.cookie-preferences-heading{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.cookie-preferences-heading span{
    color: var(--accent-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cookie-preferences-heading h2{
    margin: 4px 0 0;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.1;
}

.cookie-preferences-close{
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-deep);
    color: var(--text-on-dark);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.cookie-preference{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--surface-card);
}

.cookie-preference strong{
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
}

.cookie-preference p{
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.cookie-switch{
    display: grid;
    justify-items: center;
    gap: 5px;
    min-width: 112px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.cookie-switch input{
    width: 42px;
    height: 22px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.cookie-switch input:disabled{
    cursor: not-allowed;
}

.cookie-preferences-actions{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 4px;
}

.cookie-preferences-actions a{
    color: var(--text-on-light);
    font-size: 13px;
}

.footer-cookie-settings{
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    cursor: pointer;
}

@media (max-width: 900px){
    .cookie-consent-banner{
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cookie-consent-actions{
        justify-content: stretch;
    }

    .cookie-consent-actions .cookie-consent-button{
        flex: 1 1 180px;
    }
}

@media (max-width: 600px){
    .cookie-consent-banner{
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        left: 12px;
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        gap: 12px;
        padding: 18px;
        overflow: auto;
        border-radius: 15px;
    }

    .cookie-consent-copy strong{
        font-size: 17px;
    }

    .cookie-consent-copy p{
        font-size: 12px;
    }

    .cookie-consent-actions{
        display: grid;
        grid-template-columns: 1fr;
    }

    .cookie-consent-actions .cookie-consent-button{
        width: 100%;
    }

    .cookie-preferences-form{
        gap: 14px;
        padding: 22px 18px;
    }

    .cookie-preference{
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .cookie-switch{
        justify-items: start;
    }

    .cookie-preferences-actions{
        align-items: stretch;
        flex-direction: column;
    }

    .cookie-preferences-actions .cookie-consent-button{
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce){
    .cookie-consent-button{
        transition: none;
    }
}
