/* ============================================================
   Cookie Consent WP — Frontend Styles (tabbed dialoog)
   ============================================================ */

:root {
    --ccw-accent: #2563eb;
    --ccw-radius: 12px;
    --ccw-font:   system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ccw-line:   #eef0f3;
}

/* ── Overlay ─────────────────────────────────────────────── */
#ccw-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    z-index: 99998;
    display: none;
    backdrop-filter: blur(2px);
}

/* ── Dialoog (gecentreerd) ───────────────────────────────── */
#ccw-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(800px, calc(100% - 32px));
    max-height: min(90vh, 760px);
    display: none;               /* JS zet op 'flex' */
    flex-direction: column;
    background: #ffffff;
    border-radius: var(--ccw-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    font-family: var(--ccw-font);
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
    z-index: 100000;
    box-sizing: border-box;
    overflow: hidden;
}

/* ── Layout: compacte horizontale balk onderaan ──────────── */
#ccw-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    background: #ffffff;
    border-radius: var(--ccw-radius) var(--ccw-radius) 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, .18);
    font-family: var(--ccw-font);
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
    max-height: 92vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.ccw-bar-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 28px;
    box-sizing: border-box;
}

.ccw-bar-content { flex: 1 1 auto; min-width: 0; }

.ccw-bar-content h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.ccw-bar-content .ccw-intro     { margin: 0 0 14px; }
.ccw-bar-content .ccw-intro a   { color: var(--ccw-accent); text-decoration: underline; }

.ccw-bar-cats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
}

.ccw-bar-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.ccw-bar-details {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: var(--ccw-font);
    font-size: 14px;
    font-weight: 700;
    color: var(--ccw-accent);
    white-space: nowrap;
}
.ccw-bar-details:hover { text-decoration: underline; }

.ccw-bar-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 220px;
}
.ccw-bar-actions .ccw-btn { width: 100%; flex: none; }

@media (max-width: 760px) {
    .ccw-bar-inner   { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px 16px; }
    .ccw-bar-actions { width: 100%; }
    .ccw-bar-cats    { gap: 12px 18px; }
}

/* ── Tabbladen ───────────────────────────────────────────── */
.ccw-tabs {
    display: flex;
    flex-shrink: 0;
    padding: 0 16px;
    border-bottom: 1px solid var(--ccw-line);
}

.ccw-tab {
    flex: 1;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 18px 8px;
    margin-bottom: -1px;
    font-family: var(--ccw-font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: #111827;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    user-select: none;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
}

.ccw-tab:hover  { color: var(--ccw-accent); }
.ccw-tab:focus  { outline: 2px solid var(--ccw-accent); outline-offset: -4px; }
.ccw-tab.active {
    color: var(--ccw-accent);
    border-bottom-color: var(--ccw-accent);
}

/* ── Body / panelen ──────────────────────────────────────── */
.ccw-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 24px;
    -webkit-overflow-scrolling: touch;
}

.ccw-tab-panel        { display: none; }
.ccw-tab-panel.active { display: block; }

#ccw-banner h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.ccw-intro     { margin: 0; color: #374151; }
.ccw-intro a   { color: var(--ccw-accent); text-decoration: underline; }

/* ── Toestemming: compacte toggle-rij ────────────────────── */
.ccw-cat-row {
    display: flex;
    flex-wrap: wrap;
    margin-top: 22px;
    border-top: 1px solid var(--ccw-line);
}

.ccw-cat-col {
    flex: 1 1 0;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px 8px;
    border-left: 1px solid var(--ccw-line);
}

.ccw-cat-col:first-child { border-left: none; }

.ccw-cat-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    text-align: center;
}

/* ── Details: categorie + aantal + beschrijving ──────────── */
.ccw-detail {
    padding: 18px 0;
    border-top: 1px solid var(--ccw-line);
}

.ccw-detail:first-child { border-top: none; padding-top: 0; }

.ccw-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ccw-detail-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.ccw-count {
    display: inline-block;
    min-width: 22px;
    padding: 1px 8px;
    margin-left: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    background: #eef0f3;
    border-radius: 999px;
    text-align: center;
    vertical-align: middle;
}

.ccw-detail-desc {
    margin: 10px 0 0;
    color: #6b7280;
    font-size: 14px;
}

/* ── Over ────────────────────────────────────────────────── */
#ccw-panel-about p           { margin: 0 0 16px; color: #374151; }
#ccw-panel-about p:last-child { margin-bottom: 0; }

/* ── Voettekst met knoppen ───────────────────────────────── */
.ccw-footer {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    padding: 16px 24px;
    border-top: 1px solid var(--ccw-line);
}

.ccw-btn {
    flex: 1 1 0;
    padding: 14px 18px;
    border-radius: calc(var(--ccw-radius) - 4px);
    border: none;
    cursor: pointer;
    font-family: var(--ccw-font);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    background: var(--ccw-accent);
    color: #ffffff;
    transition: opacity .18s;
}

.ccw-btn:hover  { opacity: .9; }
.ccw-btn:focus  { outline: 2px solid var(--ccw-accent); outline-offset: 2px; }
.ccw-btn:active { opacity: .8; }

@media (max-width: 560px) {
    .ccw-body    { padding: 20px 16px; }
    .ccw-tab     { font-size: 14px; padding: 16px 4px; }
    .ccw-footer  { flex-direction: column-reverse; }

    /* Categorie-toggles: nette volle-breedte rijen i.p.v. een grid dat afbreekt */
    .ccw-cat-row { display: block; margin-top: 16px; }
    .ccw-cat-col {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 14px 2px;
        border-left: none;
        border-top: 1px solid var(--ccw-line);
    }
    .ccw-cat-row .ccw-cat-col:first-child { border-top: none; }
    .ccw-cat-name { text-align: left; }
}

/* ── Toggle switch ───────────────────────────────────────── */
.ccw-toggle {
    position: relative;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
    display: inline-block;
}

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

.ccw-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 26px;
    cursor: pointer;
    transition: background .22s;
}

.ccw-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform .22s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.ccw-toggle input:checked + .ccw-toggle-slider          { background: var(--ccw-accent); }
.ccw-toggle input:checked + .ccw-toggle-slider::before  { transform: translateX(18px); }
.ccw-toggle input:disabled + .ccw-toggle-slider         { cursor: not-allowed; opacity: .55; }
.ccw-toggle input:focus + .ccw-toggle-slider {
    outline: 2px solid var(--ccw-accent);
    outline-offset: 2px;
}

/* ── Beheer-widget (zwevend cookie-knopje) ───────────────── */
#ccw-manage-link {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    padding: 8px;
    display: none;              /* JS toont 'm met flex */
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    box-sizing: border-box;
    transition: transform .15s, box-shadow .15s;
}

#ccw-manage-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .24);
}

#ccw-manage-link svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Scrollbar stijl (Webkit) ────────────────────────────── */
.ccw-body::-webkit-scrollbar       { width: 6px; }
.ccw-body::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
.ccw-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.ccw-body::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
