﻿/* ===== Overlay ===== */
.cb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9998;
}

/* ===== Modal root ===== */
.cb-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ===== Card ===== */
.cb-card {
    background: #fff;
    color: #111;
    border-top: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 -12px 40px rgba(0,0,0,.22);
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 22px;
}

/* ===== Header + Tabs ===== */
.cb-header {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cb-logo {
    font-weight: 700;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 14px;
}

.cb-tabs {
    display: flex;
    gap: 18px;
    align-items: flex-end;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.cb-tab {
    background: transparent;
    border: 0;
    padding: 10px 2px;
    font-weight: 700;
    cursor: pointer;
    color: #333;
    border-bottom: 2px solid transparent;
}

    .cb-tab.is-active {
        color: var(--pageControlBackground);
        border-bottom-color: var(--pageControlBackground);
    }

/* ===== Content ===== */
.cb-title {
    margin: 6px 0 8px;
    font-size: 22px;
    font-weight: 800;
}

.cb-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: #333;
}

.cb-panel {
    display: none;
}

    .cb-panel.is-active {
        display: block;
    }

/* ===== Accordion (Detaljer) ===== */
.cb-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.cb-acc-item {
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 10px;
    overflow: hidden;
}

.cb-acc-header {
    width: 100%;
    background: #fff;
    border: 0;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.cb-acc-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cb-chevron {
    font-size: 18px;
    width: 16px;
}

.cb-count {
    background: #eee;
    border-radius: 999px;
    font-size: 12px;
    padding: 2px 8px;
    color: #333;
}

.cb-acc-body {
    display: none;
    padding: 0 16px 14px 42px;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}

.cb-acc-item.is-open .cb-acc-body {
    display: block;
}

/* ===== Toggle switch (Cookiebot-ish) ===== */
.cb-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

    .cb-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.cb-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 999px;
    transition: .2s;
}

    .cb-slider::before {
        content: "";
        position: absolute;
        height: 18px;
        width: 18px;
        left: 3px;
        top: 3px;
        background: #fff;
        border-radius: 50%;
        transition: .2s;
    }

.cb-switch input:checked + .cb-slider {
    background: var(--pageControlBackground);
}

    .cb-switch input:checked + .cb-slider::before {
        transform: translateX(18px);
    }

.cb-switch input:disabled + .cb-slider {
    opacity: .6;
    cursor: not-allowed;
}

/* ===== Footer buttons ===== */
.cb-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    gap: 12px;
}

.cb-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cb-btn {
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    min-width: 140px;
}

.cb-btn-primary {
    background: var(--pageControlBackground);
    color: #fff;
}

.cb-btn-secondary {
    background: #efefef;
    color: #222;
}

.cb-btn:active {
    transform: translateY(1px);
}

/* ===== Tablet: center modal ===== */
@media (max-width:1080px) {
    .cb-modal {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }

    .cb-card {
        max-width: 760px;
        border: 1px solid rgba(0,0,0,.10);
        border-radius: 14px;
        box-shadow: 0 18px 70px rgba(0,0,0,.35);
    }
}

/* ===== Mobil: stacked knapper + layout ===== */
@media (max-width:600px) {
    .cb-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cb-tabs {
        width: 100%;
        justify-content: space-between;
        gap: 0;
    }

    .cb-actions {
        flex-direction: column;
        width: 100%;
    }

    .cb-btn {
        width: 100%;
        min-width: 0;
    }

    .cb-title {
        font-size: 20px;
    }
}
