/* ==========================================================
   SBC Cookie Consent — Banner + Modal Styles
   ========================================================== */

/* ── Banner (bottom bar) ───────────────────────────── */

.sbc-cb {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99990;
    background: #1e293b;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .25);
    transform: translateY(100%);
    transition: transform .35s ease;
}

.sbc-cb[aria-hidden="false"] {
    transform: translateY(0);
}

.sbc-cb__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.sbc-cb__text {
    flex: 1;
    margin: 0;
}

.sbc-cb__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Buttons (shared between banner and modal) */

.sbc-cb__btn {
    padding: 10px 20px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity .2s, background .2s;
}

.sbc-cb__btn:hover {
    opacity: .9;
}

.sbc-cb__btn--accept {
    background: #2563eb;
    color: #fff;
}

.sbc-cb__btn--reject {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid #475569;
}

.sbc-cb__btn--settings {
    background: transparent;
    color: #93c5fd;
    border: 1px solid #93c5fd;
}

.sbc-cb__btn--save {
    background: #475569;
    color: #fff;
}

/* Mobile: stack */
@media (max-width: 768px) {
    .sbc-cb__inner {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        gap: 14px;
    }

    .sbc-cb__actions {
        flex-direction: column;
        width: 100%;
    }

    .sbc-cb__btn {
        width: 100%;
        padding: 12px;
    }
}

/* ── Modal overlay + dialog ────────────────────────── */

.sbc-cm {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99995;
}

.sbc-cm[aria-hidden="false"] {
    display: block;
}

.sbc-cm__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.sbc-cm__dialog {
    position: relative;
    z-index: 1;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    margin: 6vh auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.sbc-cm__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.sbc-cm__header h3 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
}

.sbc-cm__close {
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #64748b;
}

.sbc-cm__body {
    padding: 16px 24px;
}

/* ── Category blocks ───────────────────────────────── */

.sbc-cm__category {
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
}

.sbc-cm__category:last-child {
    border-bottom: 0;
}

.sbc-cm__cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sbc-cm__cat-info h4 {
    margin: 0;
    font-size: 15px;
    color: #1e293b;
}

.sbc-cm__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #059669;
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 4px;
}

.sbc-cm__cat-desc {
    font-size: 13px;
    color: #64748b;
    margin: 8px 0 0;
    line-height: 1.5;
}

/* ── Toggle switch (CSS only) ──────────────────────── */

.sbc-cm__toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.sbc-cm__toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.sbc-cm__toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: background .25s;
}

.sbc-cm__toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.sbc-cm__toggle input:checked+.sbc-cm__toggle-slider {
    background: #2563eb;
}

.sbc-cm__toggle input:checked+.sbc-cm__toggle-slider::before {
    transform: translateX(20px);
}

.sbc-cm__toggle input:focus-visible+.sbc-cm__toggle-slider {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

/* ── Modal footer ──────────────────────────────────── */

.sbc-cm__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .sbc-cm__dialog {
        margin: 3vh 12px;
        max-height: 90vh;
    }

    .sbc-cm__footer {
        flex-direction: column;
    }

    .sbc-cm__footer .sbc-cb__btn {
        width: 100%;
    }
}