/* =========================================================
   COOKIE CONSENT BANNER (views/partials/cookie_consent.php)
   ========================================================= */
.np-cc {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9990;
    display: flex;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .25s ease, transform .25s ease;
}
.np-cc.is-visible {
    opacity: 1;
    transform: none;
}
.np-cc[hidden] { display: none; }

.np-cc-box {
    pointer-events: auto;
    width: 100%;
    max-width: 980px;
    background: #fff;
    border: 1px solid var(--np-border, #eceef4);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(9, 5, 47, .18);
    padding: 20px 22px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.np-cc-main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.np-cc-icon {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 20px;
    color: var(--np-pink, #e7287c);
    background: rgba(231, 40, 124, .1);
}
.np-cc-copy h2 {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 4px;
    color: var(--np-dark, #09052f);
}
.np-cc-copy p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--np-text, #555b6d);
}
.np-cc-copy a {
    color: var(--np-pink, #e7287c);
    text-decoration: underline;
    font-weight: 600;
}

.np-cc-prefs {
    margin-top: 16px;
    border-top: 1px solid var(--np-border, #eceef4);
}
.np-cc-prefs[hidden] { display: none; }
.np-cc-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--np-border, #eceef4);
}
.np-cc-cat strong {
    display: block;
    font-size: 15px;
    color: var(--np-dark, #09052f);
}
.np-cc-cat span {
    font-size: 13px;
    color: var(--np-text, #555b6d);
}

/* Toggle switch */
.np-cc-switch {
    position: relative;
    flex: 0 0 44px;
    height: 24px;
    margin: 0;
    cursor: pointer;
}
.np-cc-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: inherit;
}
.np-cc-switch span {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: #cfd3de;
    transition: background .2s;
}
.np-cc-switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .2s;
}
.np-cc-switch input:checked + span { background: var(--np-pink, #e7287c); }
.np-cc-switch input:checked + span::after { transform: translateX(20px); }
.np-cc-switch input:focus-visible + span { outline: 2px solid var(--np-blue, #2873ba); outline-offset: 2px; }
.np-cc-switch.is-locked { cursor: not-allowed; opacity: .6; }

.np-cc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}
.np-cc-btn {
    border: 2px solid var(--np-pink, #e7287c);
    background: var(--np-pink, #e7287c);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    padding: 11px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.np-cc-btn:hover { background: var(--np-pink-dark, #c91f69); border-color: var(--np-pink-dark, #c91f69); }
.np-cc-btn-ghost {
    background: #fff;
    color: var(--np-dark, #09052f);
    border-color: #d5d8e3;
}
.np-cc-btn-ghost:hover { background: var(--np-soft, #f8f9fc); color: var(--np-dark, #09052f); border-color: var(--np-dark, #09052f); }
.np-cc-btn[hidden] { display: none; }
.np-cc-link {
    margin-right: auto;
    background: none;
    border: 0;
    padding: 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--np-blue, #2873ba);
    text-decoration: underline;
    cursor: pointer;
}
.np-cc-btn:focus-visible,
.np-cc-link:focus-visible { outline: 2px solid var(--np-blue, #2873ba); outline-offset: 2px; }

@media (max-width: 575px) {
    .np-cc { left: 8px; right: 8px; bottom: 8px; }
    .np-cc-box { padding: 16px; }
    .np-cc-icon { display: none; }
    .np-cc-actions .np-cc-btn { flex: 1 1 calc(50% - 5px); }
    .np-cc-actions .np-cc-btn:last-child { flex-basis: 100%; }
    .np-cc-link { flex-basis: 100%; text-align: left; }
}

/* Optional embeds stay hidden until allowed; placeholder shown instead */
iframe[data-consent-src]:not([src]) { display: none !important; }
.np-cc-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 260px;
    height: 100%;
    padding: 24px;
    text-align: center;
    border-radius: 12px;
    background: var(--np-soft, #f8f9fc);
    border: 1px dashed #d5d8e3;
    color: var(--np-text, #555b6d);
}
.np-cc-placeholder i { font-size: 32px; color: var(--np-pink, #e7287c); }
.np-cc-placeholder p { margin: 0; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
    .np-cc { transition: none; }
}
@media print {
    .np-cc { display: none !important; }
}
