.cookie-banner {
    position: fixed;
    z-index: 100000;
    inset: 16px;
    width: min(850px, calc(100% - 32px));
    height: fit-content;
    max-width: 850px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: auto;
    padding: 24px;
    background: rgba(17, 24, 39, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #f8fafc;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 20px rgba(34, 211, 238, 0.1);
    font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: cookieBannerSlideUp 0.3s ease-out;
}

.cookie-banner::backdrop { background: rgba(0, 5, 15, .76); }
.cookie-banner[hidden], .cookie-banner [hidden] { display: none !important; }
body.cookie-consent-open { overflow: hidden; }
.cookie-banner:focus-visible { outline: 3px solid #ffe083; outline-offset: 3px; }

@keyframes cookieBannerSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.cookie-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cookie-banner h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
}

.cookie-close-btn {
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.cookie-close-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.cookie-close-btn:focus-visible,
.cookie-btn:focus-visible,
.cookie-banner a:focus-visible,
.cookie-option input:focus-visible,
.cookie-blocked-embed button:focus-visible {
    outline: 3px solid #f8fafc;
    outline-offset: 2px;
}
.cookie-banner p { margin: 0 0 14px; color: #cbd5e1; font-size: 0.938rem; }
.cookie-banner a { color: #67e8f9; text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner a:hover { color: #a5f3fc; }

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.cookie-btn {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #1e293b;
    color: #f8fafc;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-btn:hover { background: #334155; color: #fff; border-color: #475569; }

.cookie-btn-primary {
    border-color: #22d3ee;
    background: #67e8f9;
    color: #082032;
    text-shadow: none;
}

.cookie-btn-primary:hover {
    border-color: #38bdf8;
    background: #a5f3fc;
    color: #082032;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}

.cookie-settings {
    display: none;
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #334155;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
}

.cookie-settings.is-open { display: block; }

.cookie-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
}

.cookie-option:first-child { padding-top: 0; border-top: none; }
.cookie-option:last-child { padding-bottom: 0; }
.cookie-option { min-height: 44px; }
.cookie-option input[type="checkbox"] { width: 24px; height: 24px; margin-top: 3px; accent-color: #22d3ee; cursor: pointer; }
.cookie-option input[type="checkbox"]:disabled { opacity: 0.7; cursor: not-allowed; }
.cookie-option strong { display: block; color: #f1f5f9; font-size: 0.95rem; }
.cookie-option span { color: #94a3b8; font-size: 0.875rem; }

.cookie-blocked-embed {
    display: flex;
    min-height: 140px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    padding: 24px;
    border: 1px dashed #334155;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    color: #cbd5e1;
    text-align: center;
}

.cookie-blocked-embed strong { color: #f8fafc; font-size: 1rem; }

.cookie-blocked-embed button {
    padding: 8px 16px;
    border: 1px solid #22d3ee;
    border-radius: 8px;
    background: rgba(34, 211, 238, 0.1);
    color: #38bdf8;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-blocked-embed button:hover { background: #22d3ee; color: #0f172a; }

@media (max-width: 640px) {
    .cookie-banner { inset: 12px; width: calc(100% - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 18px; }
    .cookie-actions { flex-direction: column; }
    .cookie-actions > * { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .cookie-banner, .cookie-banner * { animation: none; transition: none; }
}
