/*!
 * FulgerHost Cookie Consent v1.0.0
 * Totul este prefixat cu .fhcc si folosesc !important doar acolo unde temele
 * WHMCS suprascriu agresiv (butoane, tipografie).
 */

.fhcc {
    --fhcc-accent: #2563eb;
    --fhcc-bg: #ffffff;
    --fhcc-fg: #1f2430;
    --fhcc-muted: #5b6472;
    --fhcc-border: #e3e7ee;
    --fhcc-radius: 12px;
    --fhcc-shadow: 0 12px 40px rgba(16, 24, 40, .18);
    font-family: inherit;
    color: var(--fhcc-fg);
    line-height: 1.55;
}

.fhcc[data-theme="dark"] {
    --fhcc-bg: #171a21;
    --fhcc-fg: #eef1f6;
    --fhcc-muted: #a6aebd;
    --fhcc-border: #2a2f3a;
    --fhcc-shadow: 0 12px 40px rgba(0, 0, 0, .55);
}

.fhcc [hidden] { display: none !important; }

.fhcc-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ */
/* Fundal                                                              */
/* ------------------------------------------------------------------ */

.fhcc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 30, .55);
    z-index: 2147483000;
}

/* ------------------------------------------------------------------ */
/* Stratul 1 - bannerul                                                */
/* ------------------------------------------------------------------ */

.fhcc-banner {
    position: fixed;
    z-index: 2147483001;
    box-sizing: border-box;
    max-width: 440px;
    padding: 22px 24px;
    background: var(--fhcc-bg);
    border: 1px solid var(--fhcc-border);
    border-radius: var(--fhcc-radius);
    box-shadow: var(--fhcc-shadow);
    animation: fhcc-in .22s ease-out;
}

.fhcc[data-layout="box-stanga"] .fhcc-banner { left: 20px; bottom: 20px; }
.fhcc[data-layout="box-dreapta"] .fhcc-banner { right: 20px; bottom: 20px; }

.fhcc[data-layout="bara-jos"] .fhcc-banner {
    left: 0; right: 0; bottom: 0;
    max-width: none;
    border-radius: 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    padding: 20px clamp(16px, 5vw, 48px);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 32px;
    align-items: center;
}
.fhcc[data-layout="bara-jos"] .fhcc-actions { grid-row: 1 / span 3; grid-column: 2; }

.fhcc[data-layout="modal-centru"] .fhcc-banner {
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    max-width: 520px;
}

@keyframes fhcc-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
.fhcc[data-layout="modal-centru"] .fhcc-banner { animation: none; }

.fhcc-title {
    margin: 0 0 8px !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: var(--fhcc-fg) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.fhcc-body {
    margin: 0 0 12px !important;
    font-size: 14px !important;
    color: var(--fhcc-muted) !important;
}

.fhcc-links { margin: 0 0 16px !important; font-size: 13px !important; }
.fhcc-link { color: var(--fhcc-accent) !important; text-decoration: underline !important; }
.fhcc-sep { color: var(--fhcc-muted); margin: 0 4px; }

/* ------------------------------------------------------------------ */
/* Butoane - Accepta si Refuza au acelasi stil, deliberat               */
/* ------------------------------------------------------------------ */

.fhcc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fhcc-btn {
    flex: 1 1 auto;
    min-width: 128px;
    box-sizing: border-box;
    padding: 10px 16px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: center;
    border-radius: 8px !important;
    border: 1px solid transparent !important;
    cursor: pointer;
    transition: filter .15s ease, background-color .15s ease;
}

.fhcc-btn-primary {
    background: var(--fhcc-accent) !important;
    color: #fff !important;
}
.fhcc-btn-primary:hover { filter: brightness(1.08); }

.fhcc-btn-ghost {
    background: transparent !important;
    color: var(--fhcc-fg) !important;
    border-color: var(--fhcc-border) !important;
}
.fhcc-btn-ghost:hover { background: rgba(127, 137, 153, .12) !important; }

.fhcc-btn:focus-visible,
.fhcc-close:focus-visible,
.fhcc-switch input:focus-visible + .fhcc-slider,
.fhcc-badge:focus-visible {
    outline: 3px solid var(--fhcc-accent);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Stratul 2 - panoul de setari                                        */
/* ------------------------------------------------------------------ */

.fhcc-prefs {
    position: fixed;
    z-index: 2147483002;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    width: min(600px, calc(100vw - 32px));
    max-height: min(86vh, 760px);
    display: flex;
    flex-direction: column;
    background: var(--fhcc-bg);
    border-radius: var(--fhcc-radius);
    box-shadow: var(--fhcc-shadow);
    overflow: hidden;
}

.fhcc-prefs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 14px;
    border-bottom: 1px solid var(--fhcc-border);
}

.fhcc-close {
    background: none !important;
    border: 0 !important;
    padding: 0 4px !important;
    font-size: 26px !important;
    line-height: 1 !important;
    color: var(--fhcc-muted) !important;
    cursor: pointer;
}

.fhcc-prefs-body {
    padding: 18px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.fhcc-cat {
    padding: 14px 0;
    border-top: 1px solid var(--fhcc-border);
}
.fhcc-cat:first-of-type { border-top: 0; }

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

.fhcc-cat-name {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--fhcc-fg) !important;
}

.fhcc-cat-desc {
    margin: 6px 0 0 !important;
    font-size: 13px !important;
    color: var(--fhcc-muted) !important;
}

.fhcc-always {
    flex: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--fhcc-muted);
    padding: 4px 10px;
    border: 1px solid var(--fhcc-border);
    border-radius: 999px;
}

.fhcc-prefs-foot {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--fhcc-border);
}
.fhcc-prefs-foot .fhcc-links { margin-bottom: 12px !important; }

/* Comutator */
.fhcc-switch {
    flex: none;
    position: relative;
    display: inline-block;
    width: 46px; height: 26px;
    margin: 0 !important;
    cursor: pointer;
}
.fhcc-switch input {
    position: absolute;
    opacity: 0;
    width: 100%; height: 100%;
    margin: 0;
    cursor: pointer;
}
.fhcc-slider {
    position: absolute;
    inset: 0;
    background: #b9c0cc;
    border-radius: 999px;
    transition: background-color .18s ease;
}
.fhcc-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, .25);
    transition: transform .18s ease;
}
.fhcc-switch input:checked + .fhcc-slider { background: var(--fhcc-accent); }
.fhcc-switch input:checked + .fhcc-slider::before { transform: translateX(20px); }

/* ------------------------------------------------------------------ */
/* Buton de redeschidere                                               */
/* ------------------------------------------------------------------ */

.fhcc-badge {
    position: fixed;
    left: 18px; bottom: 18px;
    z-index: 2147482999;
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    background: var(--fhcc-bg) !important;
    color: var(--fhcc-muted) !important;
    border: 1px solid var(--fhcc-border) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .16);
    cursor: pointer;
    opacity: .75;
    transition: opacity .15s ease;
}
.fhcc-badge:hover { opacity: 1; }

/* ------------------------------------------------------------------ */
/* Mobil                                                               */
/* ------------------------------------------------------------------ */

@media (max-width: 560px) {
    .fhcc[data-layout] .fhcc-banner {
        left: 12px; right: 12px; bottom: 12px;
        top: auto;
        max-width: none;
        transform: none;
        padding: 18px 18px 20px;
        max-height: 80vh;
        overflow-y: auto;
    }
    .fhcc[data-layout="bara-jos"] .fhcc-banner { display: block; }
    .fhcc-btn { flex: 1 1 100%; }
    .fhcc-prefs { width: calc(100vw - 20px); max-height: 90vh; }
    .fhcc-prefs-head, .fhcc-prefs-body, .fhcc-prefs-foot { padding-left: 18px; padding-right: 18px; }
    /* Nu acoperi widgetul de chat, care sta de obicei in dreapta jos. */
    .fhcc-badge { left: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .fhcc-banner { animation: none; }
    .fhcc-btn, .fhcc-slider, .fhcc-slider::before, .fhcc-badge { transition: none; }
}
