/* ─── CB Cookie Consent Banner ──────────────────────────────────────────── */
#ccc-banner {
    position: fixed;
    z-index: 99999;
    background: var(--ccc-bg, #fff);
    color: var(--ccc-text, #1f2937);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 -4px 24px rgba(0,0,0,.12);
}

/* Positions */
#ccc-banner.ccc-pos-bottom { left:0; right:0; bottom:0; border-top:3px solid var(--ccc-primary,#2563eb); }
#ccc-banner.ccc-pos-top    { left:0; right:0; top:0;    border-bottom:3px solid var(--ccc-primary,#2563eb); }
#ccc-banner.ccc-pos-modal  {
    left: 50%; top: 50%;
    transform: translate(-50%,-50%);
    width: min(700px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    border-top: 4px solid var(--ccc-primary,#2563eb);
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
}

/* Inner wrapper */
.ccc-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.ccc-wrap-block { display: block; max-width: 100%; }

/* Text area */
.ccc-text  { flex: 1; min-width: 260px; }
.ccc-title { font-size: 15px; font-weight: 700; display: block; margin-bottom: 4px; }
.ccc-intro { margin: 0; color: #6b7280; font-size: 13px; }
.ccc-link  { color: var(--ccc-primary,#2563eb); text-decoration: underline; }

/* Buttons */
.ccc-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.ccc-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: opacity .15s, transform .1s;
}
.ccc-btn:hover { opacity: .85; transform: translateY(-1px); }

.ccc-btn-primary { background: var(--ccc-primary,#2563eb); color: #fff; }
.ccc-btn-outline { background: transparent; color: var(--ccc-primary,#2563eb); border: 2px solid var(--ccc-primary,#2563eb); }
.ccc-btn-ghost   { background: #f3f4f6; color: #374151; }

/* Category blocks */
.ccc-cat-block {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}
.ccc-cat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    gap: 12px;
}
.ccc-cat-label  { font-weight: 700; font-size: 14px; }
.ccc-cat-count  { font-size: 11px; color: #9ca3af; margin-left: 8px; }
.ccc-cat-body   { padding: 8px 16px 12px; }

/* Category colour coding */
.ccc-cat-necessary     { color: #059669; }
.ccc-cat-analytics     { color: #2563eb; }
.ccc-cat-marketing     { color: #dc2626; }
.ccc-cat-preferences   { color: #7c3aed; }
.ccc-cat-external_media{ color: #d97706; }

/* Always-on badge */
.ccc-always-on {
    font-size: 11px; font-weight: 600;
    color: #059669; background: #d1fae5;
    padding: 3px 10px; border-radius: 20px;
}

/* Toggle switch */
.ccc-switch { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; flex-shrink: 0; }
.ccc-switch input { opacity: 0; width: 0; height: 0; }
.ccc-track {
    position: absolute; inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: background .25s;
}
.ccc-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.ccc-switch input:checked ~ .ccc-track { background: var(--ccc-primary,#2563eb); }
.ccc-switch input:checked ~ .ccc-track .ccc-thumb { transform: translateX(20px); }

/* Show-cookies button */
.ccc-show-cookies {
    background: none; border: none;
    color: var(--ccc-primary,#2563eb);
    font-size: 12px; cursor: pointer;
    padding: 4px 0; margin-bottom: 6px;
}
.ccc-chevron { transition: transform .2s; display: inline-block; }
.ccc-chevron.open { transform: rotate(90deg); }

/* Cookie detail table */
.ccc-cookie-table { margin-top: 4px; }
.ccc-cookie-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ccc-cookie-table th { background: #f3f4f6; padding: 6px 8px; text-align: left; border-bottom: 1px solid #e5e7eb; font-weight: 600; }
.ccc-cookie-table td { padding: 6px 8px; border-bottom: 1px solid #f3f4f6; vertical-align: top; color: #4b5563; }
.ccc-cookie-table code { background: #f3f4f6; padding: 1px 5px; border-radius: 3px; font-size: 11px; color: #111; }

/* Detail bottom buttons */
.ccc-detail-btns {
    display: flex; justify-content: flex-end; gap: 10px;
    margin-top: 16px; padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

/* Mobile */
@media (max-width: 600px) {
    .ccc-wrap        { flex-direction: column; align-items: stretch; }
    .ccc-btns        { flex-direction: column; }
    .ccc-btn         { text-align: center; }
    .ccc-cookie-table table { font-size: 11px; }
    .ccc-cookie-table td, .ccc-cookie-table th { padding: 4px 6px; }
}
