/* Zemo's — banner, setări și acces permanent la alegerea cookie-urilor. */
body { padding-bottom: var(--cc-banner-height, 0px); }
html { scroll-padding-bottom: calc(var(--cc-banner-height, 0px) + 1rem); }

.cc {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 10050;
    background: var(--bg-dark);
    border-top: 1px solid rgba(var(--tint), 0.14);
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.28);
    padding: 1.4rem clamp(1rem, 5vw, 3rem);
    display: none;
    font-family: var(--font-body);
    max-height: 75dvh;
    overflow-y: auto;
}
.cc.cc--vizibil { display: block; }

.cc__inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    flex-wrap: wrap;
}

.cc__text { flex: 1 1 420px; min-width: 0; }
.cc__cap {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white);
}
.cc__p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--white-dim);
    max-width: 70ch;
}
.cc__link {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cc__link:hover { color: var(--accent); }

.cc__butoane {
    display: flex;
    gap: 0.6rem;
    flex: 0 0 auto;
}

/* Identice. Singura diferenta e textul. */
.cc__buton {
    min-width: 128px;
    padding: 0.72rem 1.5rem;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--white);
    background: rgba(var(--tint), 0.06);
    border: 1px solid rgba(var(--tint), 0.28);
    border-radius: 2px;
    cursor: pointer;
    transition: background-color var(--t, 220ms) ease, border-color var(--t, 220ms) ease;
}
.cc__buton:hover {
    background: rgba(var(--tint), 0.12);
    border-color: rgba(var(--tint), 0.5);
}
.cc__buton:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Declansatorul din subsol, pentru paginile care n-au deja unul. */
.cc__declansator {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}
.cc__declansator:hover { color: var(--accent); }

/* Butonul plutitor rămâne disponibil după ce bannerul dispare. */
.cc__fab {
    position: fixed;
    right: 2rem;
    bottom: calc(1.25rem + var(--cc-banner-height, 0px));
    z-index: 10040;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--white);
    background: var(--bg-dark);
    border: 1px solid rgba(var(--tint), 0.35);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}
.cc__fab:hover { color: var(--accent); border-color: var(--accent); }
.cc__fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cc__fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.cc__fab[hidden] { display: none; }

.cc__modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.62);
}
.cc__modal[hidden] { display: none; }
.cc__panel {
    width: min(620px, 100%);
    max-height: min(88vh, 720px);
    overflow: auto;
    color: var(--white);
    background: var(--bg-dark);
    border: 1px solid rgba(var(--tint), 0.18);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.cc__modal-head { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem; border-bottom: 1px solid rgba(var(--tint), 0.12); }
.cc__modal-head h2 { margin: .45rem 0 0; font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 500; }
.cc__close { width: 40px; height: 40px; color: var(--white); background: transparent; border: 1px solid rgba(var(--tint), 0.28); cursor: pointer; font-size: 1.4rem; }
.cc__close:hover { color: var(--accent); border-color: var(--accent); }
.cc__tabs { display: flex; flex-wrap: wrap; gap: 0; padding: 0 1.5rem; border-bottom: 1px solid rgba(var(--tint), 0.12); }
.cc__tab { position: relative; padding: .9rem 1rem .8rem 0; margin-right: 1.2rem; color: var(--white-muted); background: transparent; border: 0; cursor: pointer; font: inherit; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.cc__tab[aria-selected="true"] { color: var(--accent); }
.cc__tab[aria-selected="true"]::after { content: ''; position: absolute; right: 1.2rem; bottom: -1px; left: 0; height: 2px; background: var(--accent); }
.cc__tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.cc__modal-body { padding: 1.5rem; }
.cc__modal-body > p { color: var(--white-muted); line-height: 1.65; }
.cc__tab-panel[hidden] { display: none; }
.cc__category { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; padding: 1rem 0; border-top: 1px solid rgba(var(--tint), 0.12); border-bottom: 1px solid rgba(var(--tint), 0.12); }
.cc__category strong { font-weight: 500; }
.cc__category > div { flex: 1; min-width: 0; }
.cc__category p { margin: .35rem 0 0; color: var(--white-muted); font-size: .9rem; line-height: 1.55; }
.cc__toggle { position: relative; display: inline-flex; flex: none; align-items: center; gap: .55rem; color: var(--accent); font-size: .72rem; white-space: nowrap; cursor: pointer; }
.cc__toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cc__toggle em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cc__toggle span { position: relative; width: 42px; height: 24px; background: rgba(var(--tint), .1); border: 1px solid rgba(var(--tint), .35); transition: background-color .2s ease, border-color .2s ease; }
.cc__toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: var(--white-muted); transition: transform .2s ease, background-color .2s ease; }
.cc__toggle input:checked + span { background: var(--accent); border-color: var(--accent); }
.cc__toggle input:checked + span::after { transform: translateX(18px); background: var(--bg-dark); }
.cc__toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.cc__toggle:has(input:disabled) { cursor: not-allowed; }
.cc__toggle input:disabled + span { background: var(--paper-2); border-style: dashed; }
.cc__inventory { margin-top: 1.4rem; border-top: 1px solid rgba(var(--tint), .12); }
.cc__inventory > div { padding: 1rem 0; border-bottom: 1px solid rgba(var(--tint), .12); }
.cc__inventory strong { display: block; color: var(--white); font-weight: 500; }
.cc__inventory span { display: block; margin-top: .25rem; color: var(--accent); font-size: .72rem; }
.cc__inventory p { margin: .45rem 0 0; color: var(--white-muted); font-size: .88rem; line-height: 1.55; }
.cc__modal-links { font-size: .85rem; }
.cc__modal-links a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cc__modal-actions { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1rem 1.5rem 1.5rem; }
.cc__modal-actions button { flex: 1 1 150px; min-height: 42px; padding: .65rem 1rem; color: var(--white); background: rgba(var(--tint), .06); border: 1px solid rgba(var(--tint), .28); cursor: pointer; }
.cc__modal-actions button:first-child { color: var(--bg-dark); background: var(--accent); border-color: var(--accent); }
.cc__modal-actions button:hover { border-color: var(--accent); }

@media (max-width: 700px) {
    .cc { padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom, 0px)); }
    .cc__inner { flex-direction: column; align-items: stretch; gap: 1rem; }
    .cc__butoane { width: 100%; }
    /* Latime egala si pe telefon: nici aici refuzul nu devine butonul mic. */
    .cc__buton { flex: 1 1 0; min-width: 0; }
    .cc__fab { right: 1rem; bottom: calc(1rem + var(--cc-banner-height, 0px) + env(safe-area-inset-bottom, 0px)); }
    .cc__modal { padding: .75rem; }
    .cc__tabs { padding: 0 1rem; }
    .cc__tab { margin-right: .8rem; font-size: .64rem; }
    .cc__modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .cc__modal-actions button:first-child { grid-column: 1 / -1; }
}

/* Cat timp bannerul e pe ecran, butonul de chat nu se suprapune peste el. */
.cc.cc--vizibil ~ .chat-widget { bottom: 8.5rem; }

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

/* -----------------------------------------------------------------------------
   Tabelul de cookie-uri din politica.
   Sta aici, nu in site.css, fiindca paginile din /pages/ nu incarca site.css.
   Pe telefon tabelul aluneca in cutia lui, ca sa nu clatine pagina lateral.
   -------------------------------------------------------------------------- */
.cc-tabel-cadru { max-width: 100%; overflow-x: auto; margin: 1rem 0 1.6rem; }
.cc-tabel {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.82rem;
    line-height: 1.5;
}
.cc-tabel th,
.cc-tabel td {
    text-align: left;
    vertical-align: top;
    padding: 0.6rem 0.9rem 0.6rem 0;
    border-bottom: 1px solid rgba(var(--tint), 0.12);
}
.cc-tabel thead th {
    font-weight: 500;
    color: var(--white);
    border-bottom-color: rgba(var(--tint), 0.28);
    white-space: nowrap;
}
.cc-tabel td { color: var(--white-dim); }
.cc-tabel td code {
    color: var(--white);
    font-size: 0.8rem;
    white-space: nowrap;
}
.cc-tabel tbody tr:last-child th,
.cc-tabel tbody tr:last-child td { border-bottom: 0; }

/* In coloana Legal arata ca linkurile vecine: aceeasi marime, aceeasi culoare. */
.footer-links .cc__declansator { font-size: .9rem; color: var(--white-muted); }
.footer-links .cc__declansator:hover { color: var(--white); }

/* „Personalizează”: aceeasi marime ca Refuz/Accept (nimic ascuns), dar fara
   chenar, ca sa ramana clar ca cele doua alegeri principale sunt Refuz si Accept. */
.cc__buton--pers { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.cc__buton--pers:hover { border-color: var(--rule, rgba(255,255,255,.2)); }
@media (max-width: 700px) {
    .cc__butoane { flex-wrap: wrap; }
    .cc__buton--pers { flex-basis: 100%; }
}

/* Pe telefon textul nu mai pastreaza baza de 420px ca inaltime (bannerul avea
   563px si acoperea doua treimi din ecran). */
@media (max-width: 700px) { .cc__text { flex: 0 1 auto; } }
