﻿/* Cookie consent and privacy preferences. Pairs with js3/cookie-consent.js. Prefixes: .ccb (banner), .ccm (preferences dialog).
   Self-contained so it also works on the landing pages, which do not load css3/site.css. */
.ccb, .ccm-overlay { --ink: #232326; --text: #3c3c40; --muted: #68686e; --line: #e4e4e4; --wash: #f6f5f3; --tint: #fff3ec; --orange-text: #C4480C; --amber: #F3B21B; --radius: 8px; --radius-lg: 14px; --btn-radius: 8px; --tribar: linear-gradient(90deg, #F3B21B 0 33.4%, #EF6925 33.4% 66.7%, #6b6b6b 66.7% 100%); --brand-gradient: linear-gradient(135deg, #EF6925, #DB4826); box-sizing: border-box; }
.ccb *, .ccm-overlay * { box-sizing: border-box; }

/* ---------- Banner ---------- */
.ccb { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100000; padding: 16px; display: none; font-family: inherit; pointer-events: none; }
.ccb-visible { display: block; }
.ccb-inner { pointer-events: auto; max-width: 1132px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 2px 6px rgba(0,0,0,.06), 0 18px 50px rgba(35,35,38,.24); padding: 20px 24px; display: flex; align-items: center; gap: 16px 32px; position: relative; overflow: hidden; }
.ccb-inner::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tribar); }
.ccb-text { flex: 1 1 auto; min-width: 0; color: var(--text); font-size: .875rem; line-height: 1.5; }
.ccb-text strong { display: block; font-size: 1rem; margin-bottom: 4px; color: var(--ink); }
.ccb-text p { margin: 0; }
.ccb-text a, .ccm-body a { color: var(--orange-text); text-decoration: underline; text-underline-offset: 2px; }
.ccb-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Buttons (shared by banner and dialog) ---------- */
.ccb-btn { font-family: inherit; font-size: .875rem; font-weight: 700; line-height: 1.2; padding: .8em 1.3em; border-radius: var(--btn-radius); border: 2px solid transparent; cursor: pointer; white-space: nowrap; transition: filter .15s, background-color .15s, color .15s, border-color .15s; }
.ccb-btn:focus-visible, .ccm-close:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.ccb-btn-primary { background: var(--brand-gradient); background-origin: border-box; color: #fff; }
.ccb-btn-primary:hover { filter: brightness(1.07); }
.ccb-btn-secondary { background: #fff; border-color: #c9c9cd; color: var(--ink); }
.ccb-btn-secondary:hover { border-color: var(--ink); }

/* Accept and Reject carry equal visual weight; Manage is the quiet third option. */
.ccb-actions [data-cc-action="reject"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ccb-actions [data-cc-action="reject"]:hover { background: #000; border-color: #000; }
.ccb-actions [data-cc-action="accept"], .ccb-actions [data-cc-action="reject"] { min-width: 124px; }
.ccb-actions [data-cc-action="manage"] { border-color: transparent; background: transparent; color: var(--text); text-decoration: underline; text-underline-offset: 3px; padding-left: .6em; padding-right: .6em; }
.ccb-actions [data-cc-action="manage"]:hover { color: var(--ink); }

/* ---------- Preferences dialog ---------- */
.ccm-overlay { position: fixed; inset: 0; z-index: 100001; background: rgba(24,24,26,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ccm-overlay[hidden] { display: none; }
.ccm { background: #fff; border-radius: var(--radius-lg); box-shadow: 0 12px 40px rgba(0,0,0,.28); width: 100%; max-width: 620px; max-height: 90vh; display: flex; flex-direction: column; font-family: inherit; color: var(--text); overflow: hidden; }
.ccm-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--line); position: relative; }
.ccm-header::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tribar); }
.ccm-header h2 { margin: 0; font-size: 1.1875rem; color: var(--ink); letter-spacing: 0; }
.ccm-close { background: none; border: 0; font-size: 1.625rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 8px; border-radius: var(--radius); }
.ccm-close:hover { color: var(--ink); }
.ccm-body { padding: 18px 24px; overflow-y: auto; font-size: .875rem; line-height: 1.5; }
.ccm-body > p { margin: 0 0 16px; }
.ccm-gpc-note { background: var(--tint); border: 1px solid #f4cdb5; border-radius: var(--radius); padding: 10px 14px; margin: 0 0 16px; font-size: .8125rem; }
.ccm-row { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.ccm-row p { margin: 8px 0 0; color: var(--muted); font-size: .8125rem; }
.ccm-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ccm-row-head h3 { margin: 0; font-size: .9375rem; color: var(--ink); }
.ccm-always-on { font-size: .75rem; font-weight: 700; color: #1e6b2c; background: #e9f5ea; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.ccm-footer { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--wash); }

/* ---------- Toggle switch ---------- */
.ccm-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.ccm-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ccm-slider { position: absolute; inset: 0; background: #8f8f95; border-radius: 999px; transition: background-color .15s; pointer-events: none; }
.ccm-slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.ccm-switch input:checked + .ccm-slider { background: var(--orange-text); }
.ccm-switch input:checked + .ccm-slider::before { transform: translateX(20px); }
.ccm-switch input:focus-visible + .ccm-slider { outline: 3px solid var(--amber); outline-offset: 2px; }

.cc-open-preferences { cursor: pointer; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 900px) {
    .ccb-inner { flex-direction: column; align-items: stretch; }
    .ccb-actions { justify-content: flex-end; }
}

@media (max-width: 640px) {
    .ccb { padding: 8px; }
    .ccb-inner { padding: 18px 16px 12px; gap: 14px; }
    .ccb-actions [data-cc-action="accept"], .ccb-actions [data-cc-action="reject"] { flex: 1 1 0; min-width: 0; }
    .ccb-actions [data-cc-action="reject"] { order: 1; }
    .ccb-actions [data-cc-action="accept"] { order: 2; }
    .ccb-actions [data-cc-action="manage"] { order: 3; flex: 1 1 100%; }
    .ccm-header, .ccm-body, .ccm-footer { padding-left: 16px; padding-right: 16px; }
    .ccm-footer .ccb-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .ccb-btn, .ccm-slider, .ccm-slider::before { transition: none; }
}
