/* creat de Claude in 26.08.2026 - stilul benzii de consimtamant pentru cookie-uri.
   Independent de Bootstrap (bannerul se randeaza si pe pagini care nu incarca JS-ul
   Bootstrap) si mobile-first: pe telefon banda si panoul ocupa toata latimea,
   pe desktop se aseaza pe doua coloane, respectiv intr-un card centrat.
   Culorile sunt cele ale temei: verde Adams #6AB023, albastru myelectrica #0074bb. */

#cc-root {
    --cc-green: #6AB023;
    --cc-green-dark: #5b971f;
    --cc-blue: #0074bb;
    --cc-ink: #222;
    --cc-muted: #5c6670;
    --cc-line: #e3e7ea;

    font-family: inherit;
}

/* ---------- banda de jos ---------- */

.cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;

    display: none;

    background: #fff;
    border-top: 3px solid var(--cc-green);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .16);

    padding: 16px;

    max-height: 85vh;
    overflow-y: auto;
}

.cc-banner.cc-open {
    display: block;
}

.cc-banner-inner {
    max-width: 1100px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cc-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cc-ink);
}

.cc-text {
    margin: 0;
    font-size: .92rem;
    line-height: 1.5;
    color: var(--cc-muted);
}

.cc-text a,
.cc-policy-link a {
    color: var(--cc-blue);
    text-decoration: underline;
}

.cc-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---------- butoane ---------- */

.cc-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;

    padding: 11px 18px;

    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;

    cursor: pointer;
    line-height: 1.2;
}

.cc-btn:focus-visible {
    outline: 3px solid rgba(0, 116, 187, .45);
    outline-offset: 2px;
}

.cc-btn-accept {
    background: var(--cc-green);
    color: #fff;
}

.cc-btn-accept:hover {
    background: var(--cc-green-dark);
}

.cc-btn-reject {
    background: #fff;
    border-color: #c7ced4;
    color: var(--cc-ink);
}

.cc-btn-reject:hover {
    background: #f2f4f6;
}

.cc-btn-save {
    background: var(--cc-blue);
    color: #fff;
}

.cc-btn-save:hover {
    background: #005a94;
}

.cc-btn-link {
    background: transparent;
    color: var(--cc-blue);
    text-decoration: underline;
    padding: 11px 8px;
}

/* ---------- panoul de preferinte ---------- */

.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001;

    display: none;

    background: rgba(15, 23, 30, .55);

    padding: 0;
}

.cc-modal.cc-open {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.cc-modal-card {
    background: #fff;
    width: 100%;
    max-width: 640px;
    max-height: 92vh;

    border-radius: 16px 16px 0 0;

    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 16px 18px;
    border-bottom: 1px solid var(--cc-line);
}

.cc-modal-head h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cc-ink);
}

.cc-close {
    appearance: none;
    background: transparent;
    border: 0;

    font-size: 1.7rem;
    line-height: 1;
    color: var(--cc-muted);

    padding: 0 4px;
    cursor: pointer;
}

.cc-modal-body {
    padding: 16px 18px;
    overflow-y: auto;
}

.cc-cat {
    border: 1px solid var(--cc-line);
    border-radius: 10px;

    padding: 12px 14px;
    margin-top: 12px;
}

.cc-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cc-cat-name {
    font-weight: 700;
    color: var(--cc-ink);
    font-size: .98rem;
}

.cc-always {
    font-size: .8rem;
    font-weight: 600;
    color: var(--cc-green);
    white-space: nowrap;
}

.cc-cat-desc {
    margin: 8px 0 0;
    font-size: .87rem;
    line-height: 1.5;
    color: var(--cc-muted);
}

.cc-policy-link {
    margin: 16px 0 0;
    font-size: .88rem;
}

.cc-modal-foot {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 14px 18px;
    border-top: 1px solid var(--cc-line);
    background: #fafbfc;
}

/* ---------- comutator ---------- */

.cc-switch {
    position: relative;
    display: inline-block;

    width: 46px;
    height: 26px;

    flex: 0 0 auto;
}

.cc-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.cc-slider {
    position: absolute;
    inset: 0;

    background: #c7ced4;
    border-radius: 26px;
    transition: background .15s ease;
}

.cc-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;

    width: 20px;
    height: 20px;

    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);

    transition: transform .15s ease;
}

.cc-switch input:checked + .cc-slider {
    background: var(--cc-green);
}

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

.cc-switch input:focus-visible + .cc-slider {
    outline: 3px solid rgba(0, 116, 187, .45);
    outline-offset: 2px;
}

/* ---------- butonul plutitor de redeschidere ---------- */

.cc-reopen {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 2147482999;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    color: var(--cc-green);

    border: 1px solid var(--cc-line);
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .18);

    cursor: pointer;
    opacity: .75;
}

.cc-reopen:hover {
    opacity: 1;
}

/* Cat timp banda sau panoul sunt deschise, butonul plutitor ar fi doar in plus.
   Clasa cc-busy e pusa de cookie-consent.js; regula cu :has() e doar plasa de
   siguranta pentru cazul in care JS-ul nu a apucat sa ruleze. */
#cc-root.cc-busy .cc-reopen,
#cc-root:has(.cc-banner.cc-open) .cc-reopen,
#cc-root:has(.cc-modal.cc-open) .cc-reopen {
    display: none;
}

/* ---------- desktop ---------- */

@media (min-width: 768px) {

    .cc-banner {
        padding: 20px 24px;
    }

    .cc-banner-inner {
        flex-direction: row;
        align-items: center;
        gap: 28px;
    }

    .cc-banner-text {
        flex: 1 1 auto;
    }

    .cc-banner-actions {
        flex-direction: row;
        align-items: center;
        flex: 0 0 auto;
    }

    .cc-modal.cc-open {
        align-items: center;
        padding: 24px;
    }

    .cc-modal-card {
        border-radius: 16px;
    }

    .cc-modal-foot {
        flex-direction: row;
        justify-content: flex-end;
    }

}

/* =====================================================================
   Stilul "fereastra" (cc-modal-full)

   creat de Claude in 02.09.2026 - varianta complexa, aleasa din admin
   (Setari > Consimtamant cookie-uri > Mod de afisare = "fereastra"):
   un dialog centrat, peste un fundal opac, cu trei file - Consimtamant,
   Detalii (categorii + cookie-urile din fiecare) si Despre. Cat timp
   vizitatorul nu a raspuns, dialogul primeste si clasa cc-force: nu are
   buton de inchidere si nu se poate inchide, deci pagina se poate folosi
   abia dupa Accept / Refuz / Permite selectia.
   Culorile sunt tot cele ale temei (verde Adams, albastru myelectrica).
   ===================================================================== */

/* pagina din spate nu se deruleaza cat timp dialogul blocant e deschis
   (clasa e pusa de cookie-consent.js) */
html.cc-locked,
html.cc-locked body {
    overflow: hidden;
}

.cc-modal-full {
    background: rgba(15, 23, 30, .72);
}

/* pe telefon fereastra ocupa tot ecranul */
.cc-modal-full.cc-open {
    align-items: stretch;
    justify-content: center;
}

.cc-modal-full .cc-modal-card {
    position: relative;

    width: 100%;
    max-width: 760px;
    max-height: 100%;

    border-radius: 0;
}

/* ---------- file ---------- */

.cc-tabs {
    display: flex;
    align-items: stretch;

    border-bottom: 1px solid var(--cc-line);

    /* spatiu pentru butonul de inchidere din coltul din dreapta sus */
    padding: 30px 0 0;
}

.cc-tab {
    flex: 1 1 0;

    appearance: none;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;

    padding: 13px 6px;

    font-family: inherit;
    font-size: .92rem;
    font-weight: 700;
    color: var(--cc-ink);

    cursor: pointer;
}

.cc-tab:hover {
    background: #f7f9fa;
}

.cc-tab-active {
    color: var(--cc-green);
    border-bottom-color: var(--cc-green);
}

.cc-tab:focus-visible {
    outline: 3px solid rgba(0, 116, 187, .45);
    outline-offset: -3px;
}

.cc-modal-full .cc-close {
    position: absolute;
    top: 2px;
    right: 8px;
    z-index: 2;
}

/* fara decizie nu exista iesire din dialog */
.cc-modal-full.cc-force .cc-close {
    display: none;
}

/* ---------- continutul filelor ---------- */

.cc-pane {
    display: none;
}

.cc-pane-active {
    display: block;
}

.cc-pane .cc-title {
    margin-bottom: 10px;
}

.cc-pane .cc-text + .cc-text {
    margin-top: 10px;
}

/* ---------- categoriile din fila "Detalii" ---------- */

.cc-cat-x .cc-cat-head {
    gap: 10px;
}

.cc-cat-x .cc-cat-name {
    flex: 1 1 auto;
}

.cc-count {
    display: inline-block;

    min-width: 22px;
    padding: 1px 7px;

    background: #eef1f4;
    border-radius: 11px;

    font-size: .74rem;
    font-weight: 700;
    color: var(--cc-muted);

    vertical-align: middle;
}

.cc-cat-toggle {
    appearance: none;
    background: transparent;
    border: 0;

    flex: 0 0 auto;
    padding: 0 2px;

    color: var(--cc-muted);
    cursor: pointer;
}

.cc-chev {
    display: inline-block;

    font-size: 1.5rem;
    line-height: 1;

    transform: rotate(90deg);
    transition: transform .15s ease;
}

.cc-cat-x.cc-cat-open .cc-cat-toggle .cc-chev {
    transform: rotate(-90deg);
}

.cc-cat-toggle:focus-visible {
    outline: 3px solid rgba(0, 116, 187, .45);
    outline-offset: 2px;
}

/* comutatorul categoriei "strict necesare": pornit si neschimbabil */
.cc-switch-locked input {
    cursor: default;
}

.cc-switch-locked .cc-slider {
    opacity: .7;
}

/* ---------- lista de cookie-uri a unei categorii ---------- */

.cc-cat-cookies {
    display: none;

    margin-top: 12px;
    overflow-x: auto;
}

.cc-cat-x.cc-cat-open .cc-cat-cookies {
    display: block;
}

.cc-ck-table {
    width: 100%;
    min-width: 460px;

    border-collapse: collapse;
    font-size: .8rem;
}

.cc-ck-table th,
.cc-ck-table td {
    border: 1px solid var(--cc-line);
    padding: 6px 8px;

    text-align: left;
    vertical-align: top;
    color: var(--cc-muted);
}

.cc-ck-table th {
    background: #f6f8f9;
    color: var(--cc-ink);
    white-space: nowrap;
}

.cc-ck-table code {
    color: var(--cc-blue);
    font-size: .78rem;
}

/* ---------- butoanele ferestrei ---------- */

.cc-btn-plain {
    background: transparent;
    border-color: transparent;
    color: var(--cc-ink);
}

.cc-btn-plain:hover {
    background: #f2f4f6;
}

.cc-btn-outline {
    background: #fff;
    border-color: var(--cc-green);
    color: var(--cc-ink);
}

.cc-btn-outline:hover {
    background: #f4faee;
}

.cc-btn-outline .cc-chev {
    font-size: 1.1rem;
    transform: none;
    color: var(--cc-green);
}

/* "Personalizeaza" apare pe filele Consimtamant/Despre, "Permite selectia"
   doar in fila cu comutatoare - locul din bara de butoane e acelasi */
.cc-modal-full[data-tab="details"] .cc-foot-customize {
    display: none;
}

.cc-modal-full:not([data-tab="details"]) .cc-foot-save {
    display: none;
}

/* ---------- desktop ---------- */

@media (min-width: 768px) {

    .cc-modal-full.cc-open {
        align-items: center;
        padding: 24px;
    }

    .cc-modal-full .cc-modal-card {
        max-height: 88vh;
        border-radius: 6px;
    }

    .cc-modal-full .cc-modal-body {
        padding: 20px 24px;
        min-height: 240px;
    }

    .cc-modal-full .cc-modal-foot {
        justify-content: flex-end;
    }

    /* "Refuz" ramane in stanga, restul se aduna in dreapta */
    .cc-modal-full .cc-btn-plain {
        margin-right: auto;
    }

    .cc-tab {
        font-size: 1rem;
        padding: 15px 10px;
    }

}
