/* ============================================================
   Cookie Consent WP — Frontend Styles
   ============================================================ */

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

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

/* ── Banner ──────────────────────────────────────────────── */
#ccw-banner {
    width: min(680px, calc(100% - 32px));
    background: #ffffff;
    border-radius: var(--ccw-radius);
    box-shadow: 0 8px 40px rgba(0, 0, 0, .16);
    padding: 22px 24px;
    font-family: var(--ccw-font);
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
    box-sizing: border-box;
}

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

#ccw-banner p {
    margin: 0 0 16px;
    color: #6b7280;
}

#ccw-banner p a {
    color: var(--ccw-accent);
    text-decoration: underline;
}

/* ── Knop rij ────────────────────────────────────────────── */
.ccw-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ── Buttons ─────────────────────────────────────────────── */
.ccw-btn {
    padding: 9px 18px;
    border-radius: calc(var(--ccw-radius) - 4px);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--ccw-font);
    line-height: 1.4;
    transition: opacity .18s, box-shadow .18s;
    white-space: nowrap;
}

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

.ccw-btn-accept {
    background: var(--ccw-accent);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.ccw-btn-reject {
    background: transparent;
    color: #111827;
    border: 1px solid var(--ccw-accent);
}

.ccw-btn-settings {
    background: transparent;
    color: #111827;
    border: 1px solid var(--ccw-accent);
    margin-left: auto;
}

@media (max-width: 480px) {
    .ccw-btn-settings { margin-left: 0; }
    .ccw-btn { width: 100%; text-align: center; }
}

/* ── Settings modal ──────────────────────────────────────── */
#ccw-settings-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 16px;
    box-sizing: border-box;
}

#ccw-settings-box {
    background: #ffffff;
    border-radius: var(--ccw-radius);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .22);
    width: min(520px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 28px 24px;
    font-family: var(--ccw-font);
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

#ccw-settings-box h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

#ccw-settings-box > p {
    margin: 0 0 20px;
    color: #6b7280;
}

/* ── Categorie kaarten ───────────────────────────────────── */
.ccw-category {
    border: 1px solid #e5e7eb;
    border-radius: calc(var(--ccw-radius) - 2px);
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow .2s;
}

.ccw-category:focus-within {
    box-shadow: 0 0 0 2px var(--ccw-accent);
}

.ccw-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: #f9fafb;
    gap: 12px;
}

.ccw-category-header strong {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.ccw-category p {
    margin: 0;
    padding: 0 16px 13px;
    color: #6b7280;
    font-size: 13px;
}

/* ── 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;
}

/* ── Modal knoppen ───────────────────────────────────────── */
.ccw-modal-btns {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

@media (max-width: 400px) {
    .ccw-modal-btns { flex-direction: column-reverse; }
    .ccw-modal-btns .ccw-btn { width: 100%; text-align: center; }
}

/* ── Beheer-link ─────────────────────────────────────────── */
#ccw-manage-link {
    position: fixed;
    bottom: 14px;
    left: 14px;
    font-size: 11px;
    color: #9ca3af;
    cursor: pointer;
    z-index: 9999;
    text-decoration: underline;
    background: none;
    border: none;
    font-family: var(--ccw-font);
    padding: 4px 6px;
    border-radius: 4px;
    transition: color .18s, background .18s;
}

#ccw-manage-link:hover {
    color: #4b5563;
    background: #f3f4f6;
}

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