/* =============================================================================
   WB Cookie Consent — frontend styles
   Colours mirror the site theme: #0E0D10 dark · #E60000 red · #F5F5F7 light
   ============================================================================= */

/* ── Banner ────────────────────────────────────────────────────────────────── */
#wb-cc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: #18171b;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -6px 40px rgba(0, 0, 0, 0.55);
    padding: 14px 20px;
    animation: wb-cc-slide-up 0.3s ease both;
}

#wb-cc-banner[hidden] {
    display: none;
}

@keyframes wb-cc-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.wb-cc-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.wb-cc-text {
    flex: 1;
    min-width: 260px;
}

.wb-cc-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 3px;
    letter-spacing: 0.03em;
}

.wb-cc-text p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: rgba(245, 245, 247, 0.65);
}

.wb-cc-text a {
    color: #E60000;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.wb-cc-text a:hover {
    color: #ff1a1a;
}

.wb-cc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.wb-cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
    text-decoration: none;
}

.wb-cc-btn--primary {
    background: #E60000;
    color: #ffffff;
    border-color: #E60000;
}
.wb-cc-btn--primary:hover {
    background: #cc0000;
    border-color: #cc0000;
}

.wb-cc-btn--outline {
    background: transparent;
    color: #F5F5F7;
    border-color: rgba(255, 255, 255, 0.22);
}
.wb-cc-btn--outline:hover {
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff;
}

.wb-cc-btn--ghost {
    background: transparent;
    color: rgba(245, 245, 247, 0.50);
    border-color: transparent;
    padding-left: 6px;
    padding-right: 6px;
}
.wb-cc-btn--ghost:hover {
    color: rgba(245, 245, 247, 0.85);
}

/* ── Overlay ───────────────────────────────────────────────────────────────── */
#wb-cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 9995;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: wb-cc-fade-in 0.2s ease both;
}

#wb-cc-overlay[hidden] {
    display: none;
}

@keyframes wb-cc-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.wb-cc-modal {
    background: #1c1b21;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    animation: wb-cc-scale-in 0.2s ease both;
}

@keyframes wb-cc-scale-in {
    from { transform: scale(0.96); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.wb-cc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.wb-cc-modal-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
}

.wb-cc-modal-close {
    background: none;
    border: none;
    color: rgba(245, 245, 247, 0.45);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: inherit;
    transition: color 0.15s, background 0.15s;
}
.wb-cc-modal-close:hover {
    color: #F5F5F7;
    background: rgba(255, 255, 255, 0.06);
}

/* ── Categories ────────────────────────────────────────────────────────────── */
.wb-cc-category {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.wb-cc-category:last-child {
    border-bottom: none;
}

.wb-cc-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wb-cc-category-info {
    flex: 1;
}

.wb-cc-category-info strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 3px;
}

.wb-cc-category-info p {
    margin: 0;
    font-size: 11.5px;
    color: rgba(245, 245, 247, 0.5);
    line-height: 1.5;
}

.wb-cc-always-on {
    font-size: 10px;
    font-weight: 700;
    color: rgba(245, 245, 247, 0.38);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    flex-shrink: 0;
}

/* ── Toggle ────────────────────────────────────────────────────────────────── */
.wb-cc-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
}

.wb-cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.wb-cc-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    transition: background 0.2s;
}

.wb-cc-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.wb-cc-toggle input:checked + .wb-cc-slider {
    background: #E60000;
}

.wb-cc-toggle input:checked + .wb-cc-slider::before {
    transform: translateX(18px);
}

.wb-cc-toggle input:focus-visible + .wb-cc-slider {
    outline: 2px solid #E60000;
    outline-offset: 2px;
}

/* ── Modal footer ──────────────────────────────────────────────────────────── */
.wb-cc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Re-open button (used in site footer) ──────────────────────────────────── */
.wb-cc-reopen-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.wb-cc-reopen-btn:hover {
    opacity: 0.8;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .wb-cc-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .wb-cc-actions {
        justify-content: flex-end;
    }

    .wb-cc-btn--ghost {
        display: none; /* hide Customize on mobile — use modal from save prefs */
    }
}
