.cookie-consent[hidden],
.cookie-consent__banner[hidden],
.cookie-consent__backdrop[hidden],
[data-cookie-placeholder][hidden],
[data-cookie-src][hidden] {
    display: none !important;
}

.cookie-modal-open { overflow: hidden; }

.cookie-consent {
    --cookie-ink: #111827;
    --cookie-muted: #5f6b7a;
    --cookie-line: #e4e9ee;
    --cookie-soft: #f6f8fa;
    --cookie-accent: #0797a7;
    --cookie-accent-dark: #057c89;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Banner modern: alb, text închis, umbră discretă. */
.cookie-consent__banner {
    position: fixed;
    z-index: 9998;
    right: 22px;
    bottom: 22px;
    left: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    width: min(1120px, calc(100% - 44px));
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, .10);
    border-radius: 22px;
    background: #fff;
    padding: 22px 24px;
    color: var(--cookie-ink);
    box-shadow: 0 22px 60px rgba(8, 18, 31, .18), 0 4px 16px rgba(8, 18, 31, .08);
}

.cookie-consent__banner::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #0797a7, #16bdc4);
    content: "";
}

.cookie-consent__banner-copy { min-width: 0; }
.cookie-consent__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    background: #eefafb;
    padding: 0 9px;
    color: #067f8d;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cookie-consent__banner h2,
.cookie-consent__modal h2 {
    margin: 8px 0 0;
    color: var(--cookie-ink);
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.cookie-consent__banner p {
    max-width: 700px;
    margin: 8px 0 0;
    color: var(--cookie-muted);
    font-size: 12px;
    line-height: 1.6;
}

.cookie-consent__banner a {
    display: inline-block;
    margin-top: 7px;
    color: #067f8d;
    font-size: 11px;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.cookie-consent__banner a:hover { color: #045f69; }

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

.cookie-consent__button {
    min-height: 43px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0 16px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}
.cookie-consent__button:hover { transform: translateY(-1px); }
.cookie-consent__button:focus-visible,
.cookie-consent__close:focus-visible,
.cookie-switch input:focus-visible + span {
    outline: 3px solid rgba(7, 151, 167, .24);
    outline-offset: 2px;
}

.cookie-consent__button--primary {
    background: var(--cookie-accent);
    color: #fff;
    box-shadow: 0 7px 18px rgba(7, 151, 167, .20);
}
.cookie-consent__button--primary:hover {
    background: var(--cookie-accent-dark);
    box-shadow: 0 9px 22px rgba(7, 151, 167, .25);
}
.cookie-consent__button--secondary {
    border-color: #d5dce3;
    background: #fff;
    color: var(--cookie-ink);
}
.cookie-consent__button--secondary:hover {
    border-color: #b8c3cd;
    background: #f8fafb;
}
.cookie-consent__button--ghost {
    border-color: transparent;
    background: #f2f5f7;
    color: var(--cookie-ink);
}
.cookie-consent__button--ghost:hover { background: #e9eef2; }

/* Fereastra de personalizare păstrează aceeași estetică albă. */
.cookie-consent__backdrop {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(8, 18, 31, .54);
    padding: 24px;
    backdrop-filter: blur(6px);
}
.cookie-consent__modal {
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow-y: auto;
    border: 1px solid rgba(17, 24, 39, .10);
    border-radius: 24px;
    background: #fff;
    color: var(--cookie-ink);
    box-shadow: 0 30px 90px rgba(8, 18, 31, .28), 0 6px 22px rgba(8, 18, 31, .10);
}
.cookie-consent__modal-header {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--cookie-line);
    background: rgba(255,255,255,.98);
    padding: 24px 26px 20px;
    backdrop-filter: blur(12px);
}
.cookie-consent__modal .cookie-consent__eyebrow { color: #067f8d; }
.cookie-consent__close {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid #d9e0e6;
    border-radius: 50%;
    background: #f7f9fa;
    color: #111827;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.cookie-consent__close:hover { background: #eef2f4; }
.cookie-consent__categories { display: grid; gap: 0; padding: 0 26px; }
.cookie-consent__category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid #e9edf1;
    padding: 20px 0;
}
.cookie-consent__category:last-child { border-bottom: 0; }
.cookie-consent__category strong { color: var(--cookie-ink); font-size: 14px; }
.cookie-consent__category p {
    max-width: 500px;
    margin: 5px 0 0;
    color: var(--cookie-muted);
    font-size: 11px;
    line-height: 1.58;
}
.cookie-switch { display: grid; justify-items: end; gap: 5px; cursor: pointer; }
.cookie-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cookie-switch span {
    position: relative;
    width: 46px;
    height: 26px;
    border: 1px solid #cbd4dc;
    border-radius: 999px;
    background: #dde4e9;
    transition: background .18s ease, border-color .18s ease;
}
.cookie-switch span::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(8, 18, 31, .20);
    content: "";
    transition: transform .18s ease;
}
.cookie-switch input:checked + span { border-color: var(--cookie-accent); background: var(--cookie-accent); }
.cookie-switch input:checked + span::after { transform: translateX(20px); }
.cookie-switch input:disabled + span { opacity: .72; }
.cookie-switch b { color: #667384; font-size: 9px; font-weight: 800; }
.cookie-consent__modal-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--cookie-line);
    background: rgba(255,255,255,.98);
    padding: 18px 26px 22px;
    backdrop-filter: blur(12px);
}
.cookie-consent__modal .cookie-consent__button--secondary {
    border-color: #d5dce3;
    background: #fff;
    color: var(--cookie-ink);
}

.cookie-embed-placeholder {
    display: grid;
    min-height: 210px;
    place-items: center;
    gap: 10px;
    align-content: center;
    border-radius: inherit;
    background: linear-gradient(145deg, #f3f6f8, #fff);
    padding: 24px;
    color: #4d5b6b;
    text-align: center;
}
.cookie-embed-placeholder svg { width: 28px; height: 28px; color: var(--cookie-accent); }
.cookie-embed-placeholder strong { color: var(--cookie-ink); font-size: 13px; }
.cookie-embed-placeholder p { max-width: 360px; margin: 0; font-size: 11px; line-height: 1.55; }
.cookie-embed-placeholder button {
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    background: var(--cookie-accent);
    padding: 0 13px;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 900px) {
    .cookie-consent__banner {
        grid-template-columns: 1fr;
        gap: 16px;
        width: min(720px, calc(100% - 32px));
        right: 16px;
        left: 16px;
        bottom: 16px;
    }
    .cookie-consent__banner-actions { justify-content: flex-start; }
}

@media (max-width: 600px) {
    .cookie-consent__banner {
        right: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom));
        left: 8px;
        width: auto;
        border-radius: 19px;
        padding: 18px 17px 17px 19px;
        box-shadow: 0 18px 48px rgba(8, 18, 31, .22), 0 3px 12px rgba(8, 18, 31, .09);
    }
    .cookie-consent__banner::before { width: 3px; }
    .cookie-consent__banner h2 { font-size: 18px; }
    .cookie-consent__banner p { font-size: 11px; line-height: 1.55; }
    .cookie-consent__banner-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .cookie-consent__banner-actions .cookie-consent__button { width: 100%; min-height: 44px; }
    .cookie-consent__banner-actions .cookie-consent__button--primary { grid-column: 1 / -1; }

    .cookie-consent__backdrop { align-items: end; padding: 0; }
    .cookie-consent__modal {
        width: 100%;
        max-height: 90vh;
        border-width: 1px 0 0;
        border-radius: 22px 22px 0 0;
    }
    .cookie-consent__modal-header { padding: 20px 18px 17px; }
    .cookie-consent__modal-header h2 { font-size: 18px; }
    .cookie-consent__categories { padding: 0 18px; }
    .cookie-consent__category { grid-template-columns: 1fr; gap: 13px; padding: 18px 0; }
    .cookie-switch { grid-template-columns: auto auto; align-items: center; justify-content: start; justify-items: start; }
    .cookie-consent__modal-footer {
        display: grid;
        grid-template-columns: 1fr;
        padding: 15px 18px calc(15px + env(safe-area-inset-bottom));
    }
    .cookie-consent__modal-footer .cookie-consent__button { width: 100%; min-height: 44px; }
}

@media (max-width: 380px) {
    .cookie-consent__banner-actions { grid-template-columns: 1fr; }
    .cookie-consent__banner-actions .cookie-consent__button--primary { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent__button,
    .cookie-switch span,
    .cookie-switch span::after { transition: none; }
    .cookie-consent__button:hover { transform: none; }
}
