/* ============================================================
   Cookie Consent — mini-plugin
   (Banner styles live in _gdpr.scss / the compiled theme CSS)
   ============================================================ */

/* ── Modal ──────────────────────────────────────────────────── */
#consent-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--padding, 1.25rem);
    box-sizing: border-box;
}
#consent-modal[hidden] { display: none; }

.consent-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 14, 28, 0.7);
    cursor: pointer;
}

.consent-modal-inner {
    position: relative;
    background: var(--white);
    border-radius: 8px;
    padding: calc(var(--padding) * 2);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.consent-modal-title {
    font-size: var(--h3);
    font-weight: 700;
}

/* Categories */
.cc-categories {
    display: flex;
    flex-direction: column;
}

.cc-category {
    padding: calc(var(--padding) * 1.5) 0;
    border-bottom: 1px solid var(--light-grey);
}
.cc-category:last-child { 
    border-bottom: none; 
}

.cc-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--baseline);
    margin-bottom: calc(var(--margin) * 0.5);
}

.cc-category-label {
    font-weight: 600;
    font-size: var(--p);
    color: var(--black);
    cursor: pointer;
    margin: 0;
}

.cc-category-desc {
    font-size: calc(var(--p) * 0.9);
    color: var(--gray);
    margin: calc(var(--margin) * 0.25) 0 0;
    line-height: 1.5;
}

.cc-always-on {
    font-size: calc(var(--p) * 0.75);
    background: var(--success);
    color: var(--white);
    padding: calc(var(--padding)*0.5) var(--padding);
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 500;
}

/* Toggle switch */
.cc-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin: 0;
}
.cc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.cc-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.25s;
}
.cc-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cc-switch input:checked + .cc-slider {
    background: var(--link-hover-color);
}
.cc-switch input:checked + .cc-slider::before {
    transform: translateX(20px);
}
.cc-switch input:focus-visible + .cc-slider {
    outline: 2px solid var(--link-hover-color);
    outline-offset: 2px;
}
