/* Cookie consent (GDPR + ePrivacy / RO Legea 506/2004 art. 4(5)) - v1
   Shared by all sites; each site sets --cc-accent on #cc-root. */

/* Owner's global rule: anything clickable shows a pointer. */
button:not(:disabled):not([aria-disabled="true"]),
a[href]:not([aria-disabled="true"]),
[role="button"]:not([aria-disabled="true"]),
summary,
label[for],
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled),
input[type="submit"]:not(:disabled),
input[type="button"]:not(:disabled) {
    cursor: pointer;
}
button:disabled,
[aria-disabled="true"],
input:disabled {
    cursor: not-allowed;
}

.cc-root {
    --cc-accent: #1f6cb5;
    --cc-accent-strong: var(--cc-accent);
    --cc-accent-hover: var(--cc-accent);
    --cc-ring: var(--cc-accent);
    --cc-text: #1f2933;
    --cc-muted: #52606d;
    --cc-bg: #ffffff;
    --cc-line: #e4e7eb;
    --cc-radius: 16px;
    --cc-shadow: 0 18px 50px rgba(15, 23, 42, .18), 0 2px 8px rgba(15, 23, 42, .08);
    --cc-fab-bottom: 16px;
    --cc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
    .cc-root {
        --cc-accent-strong: color-mix(in srgb, var(--cc-accent) 85%, #000);
        --cc-accent-hover: color-mix(in srgb, var(--cc-accent) 70%, #000);
        --cc-ring: color-mix(in srgb, var(--cc-accent) 50%, transparent);
    }
}

.cc-root *,
.cc-root *::before,
.cc-root *::after {
    box-sizing: border-box;
}

.cc-root [hidden] {
    display: none !important;
}

/* ---------- first layer: banner ---------- */
.cc-banner {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 2147483000;
    width: calc(100% - 32px);
    max-width: 760px;
    padding: 22px 24px 20px;
    background: var(--cc-bg);
    color: var(--cc-text);
    font: 400 14px/1.55 var(--cc-font);
    text-align: left;
    border-radius: var(--cc-radius);
    border-top: 4px solid var(--cc-accent);
    box-shadow: var(--cc-shadow);
    transform: translate(-50%, 0);
    animation: cc-slide-up .35s cubic-bezier(.2, .8, .2, 1);
}
.cc-banner:focus {
    outline: none;
}
.cc-banner:focus-visible {
    box-shadow: var(--cc-shadow), 0 0 0 3px var(--cc-ring);
}
@keyframes cc-slide-up {
    from { opacity: 0; transform: translate(-50%, 24px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

.cc-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    padding: 0;
    color: var(--cc-text);
    font: 700 17px/1.3 var(--cc-font);
    letter-spacing: 0;
    text-transform: none;
}
.cc-title svg {
    flex: none;
    width: 26px;
    height: 26px;
    color: var(--cc-accent);
}
.cc-text {
    margin: 0;
    color: var(--cc-muted);
    font: inherit;
}
.cc-root a.cc-link {
    color: var(--cc-accent-strong);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cc-root a.cc-link:hover {
    color: var(--cc-accent);
}

.cc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}
.cc-actions .cc-btn-text {
    margin-right: auto;
}

/* ---------- buttons ---------- */
.cc-root .cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 44px;
    margin: 0;
    padding: 10px 20px;
    border: 2px solid var(--cc-accent-strong);
    border-radius: 10px;
    background: var(--cc-accent-strong);
    color: #fff;
    font: 600 15px/1.2 var(--cc-font);
    text-align: center;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.cc-root .cc-btn:hover {
    background: var(--cc-accent-hover);
    border-color: var(--cc-accent-hover);
    color: #fff;
}
.cc-root .cc-btn:active {
    transform: translateY(1px);
}
.cc-root .cc-btn-text {
    min-height: 44px;
    margin: 0;
    padding: 10px 6px;
    border: 0;
    background: none;
    color: var(--cc-accent-strong);
    font: 600 15px/1.2 var(--cc-font);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-transform: none;
}
.cc-root .cc-btn-text:hover {
    color: var(--cc-accent);
}
.cc-root button:focus-visible,
.cc-root a:focus-visible {
    outline: 3px solid var(--cc-ring);
    outline-offset: 2px;
}

/* ---------- preferences modal ---------- */
.cc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .55);
    animation: cc-fade .2s ease;
}
@keyframes cc-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.cc-modal {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 580px;
    max-height: calc(100vh - 32px);
    background: var(--cc-bg);
    color: var(--cc-text);
    font: 400 14px/1.55 var(--cc-font);
    text-align: left;
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    animation: cc-pop .25s cubic-bezier(.2, .8, .2, 1);
}
.cc-modal:focus {
    outline: none;
}
@keyframes cc-pop {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.cc-modal-head {
    padding: 22px 24px 6px;
}
.cc-modal-body {
    overflow-y: auto;
    padding: 6px 24px 8px;
}
.cc-modal-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 24px 22px;
    border-top: 1px solid var(--cc-line);
}
.cc-modal-foot .cc-btn {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
}

.cc-cat {
    padding: 14px 0;
    border-bottom: 1px solid var(--cc-line);
}
.cc-cat:last-child {
    border-bottom: 0;
}
.cc-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.cc-cat-name {
    margin: 0;
    color: var(--cc-text);
    font: 700 15px/1.3 var(--cc-font);
}
.cc-cat-desc {
    margin: 6px 0 0;
    color: var(--cc-muted);
    font: 400 13.5px/1.5 var(--cc-font);
}

/* toggle switch */
.cc-switch {
    position: relative;
    flex: none;
    display: inline-block;
    width: 48px;
    height: 28px;
    margin: 0;
}
.cc-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    z-index: 1;
}
.cc-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd2d9;
    transition: background-color .2s ease;
    pointer-events: none;
}
.cc-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.cc-switch input:checked + .cc-switch-track {
    background: var(--cc-accent);
}
.cc-switch input:checked + .cc-switch-track::after {
    transform: translateX(20px);
}
.cc-switch input:disabled + .cc-switch-track {
    opacity: .55;
}
.cc-switch input:focus-visible + .cc-switch-track {
    box-shadow: 0 0 0 3px var(--cc-ring);
}

/* ---------- floating re-open button ---------- */
.cc-root .cc-fab {
    position: fixed;
    left: 16px;
    bottom: var(--cc-fab-bottom);
    z-index: 2147482999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--cc-line);
    border-radius: 50%;
    background: var(--cc-bg);
    color: var(--cc-accent);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .18);
    opacity: .85;
    transition: opacity .15s ease, transform .15s ease;
}
.cc-root .cc-fab:hover,
.cc-root .cc-fab:focus-visible {
    opacity: 1;
    transform: scale(1.06);
}
.cc-root .cc-fab svg {
    width: 24px;
    height: 24px;
}

/* ---------- blocked third-party content placeholder ---------- */
.cc-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 100%;
    min-height: 140px;
    margin: 8px 0;
    padding: 18px;
    border: 1px dashed #cbd2d9;
    border-radius: 12px;
    background: #f5f7fa;
    color: #52606d;
    font: 400 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    text-align: center;
}
.cc-placeholder p {
    margin: 0;
    padding: 0;
    color: #52606d;
    font: 400 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.cc-placeholder .cc-placeholder-btn {
    min-height: 40px;
    margin: 0;
    padding: 8px 16px;
    border: 0;
    border-radius: 8px;
    background: #3e4c59;
    color: #fff;
    font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    text-transform: none;
}
.cc-placeholder .cc-placeholder-btn:hover {
    background: #1f2933;
}
.cc-placeholder .cc-placeholder-btn:focus-visible {
    outline: 3px solid #9aa5b1;
    outline-offset: 2px;
}

/* ---------- mobile: bottom sheet ---------- */
@media (max-width: 600px) {
    .cc-banner {
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        max-height: 85vh;
        overflow-y: auto;
        padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
        border-radius: var(--cc-radius) var(--cc-radius) 0 0;
        transform: none;
        animation-name: cc-sheet-up;
    }
    @keyframes cc-sheet-up {
        from { opacity: 0; transform: translateY(40px); }
        to   { opacity: 1; transform: none; }
    }
    .cc-title {
        font-size: 16px;
    }
    .cc-text {
        font-size: 13.5px;
    }
    .cc-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .cc-actions .cc-btn,
    .cc-actions .cc-btn-text {
        width: 100%;
        margin: 0;
    }
    .cc-actions .cc-btn-text {
        order: 3;
    }
    .cc-backdrop {
        align-items: flex-end;
        padding: 0;
    }
    .cc-modal {
        max-height: 92vh;
        border-radius: var(--cc-radius) var(--cc-radius) 0 0;
    }
    .cc-modal-head,
    .cc-modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }
    .cc-modal-foot {
        flex-direction: column;
        padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    }
    .cc-modal-foot .cc-btn {
        flex: none;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-banner,
    .cc-backdrop,
    .cc-modal {
        animation: none;
    }
    .cc-switch-track,
    .cc-switch-track::after {
        transition: none;
    }
}
