
:root {
    --cc-primary: #111827;
    --cc-accent: #14336f;
    --cc-bg: #ffffff;
    --cc-overlay: rgba(17, 24, 39, 0.55);
    --cc-border: #e5e7eb;
    --cc-text: #111827;
    --cc-text-muted: #526071;
    --cc-btn-text: #ffffff;
    --cc-radius: 4px;
    --cc-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    --cc-z: 2147483645;
    --cc-tab-active: #14336f;
}
.cc-root *, .cc-revisit * { box-sizing: border-box; font-family: inherit; }
.cc-overlay { position: fixed; inset: 0; background: var(--cc-overlay); z-index: var(--cc-z); display: none; align-items: center; justify-content: center; padding: 20px; animation: cc-fade 0.25s ease; }
.cc-overlay.cc-show { display: flex; }
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
.cc-modal { background: var(--cc-bg); border-radius: var(--cc-radius); max-width: 720px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--cc-shadow); overflow: hidden; animation: cc-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes cc-pop { from { opacity: 0; transform: scale(0.96) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.cc-header { padding: 20px 28px 0; display: flex; justify-content: space-between; align-items: center; }
.cc-brand { width: 40px; height: 40px; border-radius: 50%; background: var(--cc-primary); display: flex; align-items: center; justify-content: center; font-size: 20px; color: white; }
.cc-tabs { display: flex; border-bottom: 1px solid var(--cc-border); padding: 0 28px; margin-top: 16px; }
.cc-tab { flex: 1; padding: 14px 8px; font-size: 15px; font-weight: 500; color: var(--cc-text-muted); background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s; text-align: center; }
.cc-tab.cc-tab-active { color: var(--cc-tab-active); border-bottom-color: var(--cc-tab-active); font-weight: 600; }
.cc-tab:hover:not(.cc-tab-active) { color: var(--cc-text); }
.cc-content { flex: 1; overflow-y: auto; padding: 24px 28px; }
.cc-panel { display: none; }
.cc-panel.cc-panel-active { display: block; }
.cc-title { font-size: 17px; font-weight: 700; margin: 0 0 12px; color: var(--cc-text); }
.cc-desc { font-size: 14px; color: var(--cc-text); line-height: 1.6; margin: 0 0 20px; }
.cc-desc a { color: var(--cc-accent); text-decoration: underline; text-underline-offset: 2px; }
.cc-toggles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 20px; border: 1px solid var(--cc-border); border-radius: 8px; overflow: hidden; }
.cc-toggle-cell { padding: 18px 16px; border-right: 1px solid var(--cc-border); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cc-toggle-cell:last-child { border-right: none; }
.cc-toggle-label { font-size: 14px; font-weight: 600; color: var(--cc-text); }
.cc-toggle-count { font-size: 12px; color: var(--cc-text-muted); background: #f3f4f6; padding: 2px 8px; border-radius: 12px; margin-left: 4px; }
.cc-details-row { padding: 18px 0; border-bottom: 1px solid var(--cc-border); }
.cc-details-row:last-child { border-bottom: none; }
.cc-details-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; user-select: none; }
.cc-details-head-left { display: flex; align-items: center; gap: 10px; flex: 1; }
.cc-chevron { width: 16px; height: 16px; color: var(--cc-text-muted); transition: transform 0.2s; flex-shrink: 0; }
.cc-details-row.cc-open .cc-chevron { transform: rotate(180deg); }
.cc-details-name { font-size: 15px; font-weight: 600; color: var(--cc-text); display: flex; align-items: center; gap: 8px; }
.cc-details-body { font-size: 13px; color: var(--cc-text); line-height: 1.6; padding: 10px 0 0 26px; display: none; }
.cc-details-row.cc-open .cc-details-body { display: block; }
.cc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-slider { position: absolute; inset: 0; background: var(--cc-text); border-radius: 24px; cursor: pointer; transition: background 0.2s; }
.cc-slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: transform 0.2s; }
.cc-switch input:checked + .cc-slider { background: var(--cc-accent); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(20px); }
.cc-switch input:disabled + .cc-slider { background: var(--cc-accent); opacity: 0.7; cursor: not-allowed; }
.cc-about-p { font-size: 14px; line-height: 1.6; color: var(--cc-text); margin: 0 0 14px; }
.cc-about-p:last-child { margin-bottom: 0; }
.cc-footer { padding: 16px 20px; border-top: 1px solid var(--cc-border); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; background: #fafbfc; }
.cc-btn { padding: 12px 14px; font-size: 14px; font-weight: 600; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: filter 0.15s ease; text-align: center; }
.cc-btn:hover { filter: brightness(1.1); }
.cc-btn-primary { background: var(--cc-accent); color: var(--cc-btn-text); }
.cc-privacy-row { padding: 10px 20px 14px; border-top: 1px solid var(--cc-border); background: #fafbfc; text-align: center; font-size: 13px; }
.cc-privacy-row a { color: var(--cc-accent); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.cc-revisit { position: fixed; bottom: 20px; left: 20px; width: 46px; height: 46px; border-radius: 50%; background: var(--cc-primary); color: var(--cc-btn-text); border: none; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.18); display: none; align-items: center; justify-content: center; font-size: 22px; z-index: calc(var(--cc-z) - 1); transition: transform 0.15s ease; }
.cc-revisit.cc-show { display: flex; }
.cc-revisit:hover { transform: scale(1.08); }
@media (max-width: 600px) {
    .cc-overlay { padding: 0; align-items: stretch; }
    .cc-modal { border-radius: 0; max-height: 100vh; height: 100%; max-width: 100%; }
    .cc-header, .cc-tabs, .cc-content { padding-left: 20px; padding-right: 20px; }
    .cc-toggles { grid-template-columns: 1fr 1fr; }
    .cc-toggle-cell { border-right: none; border-bottom: 1px solid var(--cc-border); }
    .cc-toggle-cell:nth-child(odd) { border-right: 1px solid var(--cc-border); }
    .cc-toggle-cell:nth-last-child(-n+2) { border-bottom: none; }
    .cc-footer { grid-template-columns: 1fr; padding: 16px; }
    .cc-btn { width: 100%; }
    .cc-tab { font-size: 14px; padding: 12px 6px; }
}

/* RC401: scoped layout, native hidden semantics, accessible controls. */
.cc-root [hidden], .cc-revisit[hidden], iframe[data-cc-category][hidden] {display:none!important}
.cc-overlay:not([hidden]) {display:flex}
.cc-revisit:not([hidden]) {display:flex;width:auto;height:auto;min-height:44px;padding:10px 14px;border-radius:6px;font-size:13px;font-weight:600}
.cc-header {padding-top:20px;color:var(--cc-primary)}
.cc-switch input {width:44px;height:24px;position:relative;margin:0;z-index:1;cursor:pointer}
.cc-switch input:focus-visible + .cc-slider {outline:3px solid #14336f;outline-offset:3px}
.cc-btn {min-height:46px}
.cc-btn:focus-visible, .cc-tab:focus-visible, .cc-revisit:focus-visible {outline:3px solid #c74600;outline-offset:3px}
.cc-details-body {display:block;padding:8px 0 0}
.cc-details-head {cursor:default}
.cc-details-name {font-size:15px}
.cc-switch input:disabled + .cc-slider {opacity:1}
body.cc-lock {overflow:hidden}
.cc-map-placeholder {padding:32px;background:#eef2f7;color:#14336f;border:1px solid #cbd5e1;border-radius:8px;text-align:center}
@media (prefers-reduced-motion:reduce) {.cc-root *, .cc-revisit {animation:none!important;transition:none!important}}
@media (max-width:600px) {.cc-modal {height:auto;max-height:100dvh}.cc-overlay {align-items:center}.cc-content {min-height:0}.cc-toggles {margin-top:12px;gap:0}.cc-toggle-cell {padding:12px 8px}.cc-footer {gap:6px}.cc-header {padding-top:12px}.cc-tabs {margin-top:8px}}
.cc-panel:not([hidden]) {display:block}

/* RC403: full-size consent dialog, anchored bottom-left. */
.cc-root .cc-overlay {align-items:flex-end;justify-content:flex-start;padding:20px}
.cc-root .cc-modal {max-width:720px;width:100%;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px)}
/* Reopen control stays in normal document flow after the footer, not floating. */
.cc-revisit:not([hidden]) {position:static;inset:auto;align-self:center;margin:8px auto;padding:8px 12px;min-height:44px;width:auto;height:auto;border:0;border-radius:0;background:transparent;color:#14336f;box-shadow:none;font-size:13px;font-weight:500;text-decoration:underline;text-underline-offset:3px;z-index:auto}
.cc-revisit:hover {transform:none}
@media (max-width:600px) {
 .cc-root .cc-overlay {padding:8px}
 .cc-root .cc-modal {border-radius:8px;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}
}

/* RC404: compact mobile presentation; all tabs, categories and actions remain. */
@media (max-width:600px) {
 .cc-root .cc-header {padding:10px 14px 0;font-size:13px}
 .cc-root .cc-tabs {margin-top:4px;padding:0 10px}
 .cc-root .cc-tab {padding:10px 4px;font-size:12px;line-height:1.25}
 .cc-root .cc-content {padding:12px 14px;min-height:0}
 .cc-root .cc-title {margin-bottom:8px;font-size:15px;line-height:1.3}
 .cc-root .cc-desc {margin-bottom:10px;font-size:13px;line-height:1.45}
 .cc-root .cc-toggles {grid-template-columns:1fr 1fr;margin-top:10px;gap:0}
 .cc-root .cc-toggle-cell {flex-direction:row;justify-content:space-between;align-items:center;gap:6px;padding:8px 7px;min-width:0}
 .cc-root .cc-toggle-label {font-size:12px;line-height:1.25;text-align:left}
 .cc-root .cc-privacy-row {padding:8px 12px;font-size:12px;line-height:1.3}
 .cc-root .cc-footer {grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:10px 12px}
 .cc-root .cc-btn {display:flex;align-items:center;justify-content:center;min-width:0;min-height:48px;height:100%;padding:6px 4px;font-size:12px;line-height:1.25;white-space:normal;overflow-wrap:normal}
 .cc-root .cc-about-p {font-size:13px;line-height:1.45;margin-bottom:10px}
 .cc-root .cc-details-row {padding:10px 0}
 .cc-root .cc-details-name {font-size:13px}
 .cc-root .cc-details-body {margin:0;font-size:12px;line-height:1.45}
}
@media (max-width:600px) {
 .cc-root .cc-modal {max-height:min(calc(100vh - 16px),70vh);max-height:min(calc(100dvh - 16px),70dvh)}
}
@media (max-width:600px) {
 .cc-root .cc-content:has(> [data-cc-panel="consent"]:not([hidden])) {display:flex;flex-direction:column;overflow:hidden}
 .cc-root [data-cc-panel="consent"]:not([hidden]) {display:flex;flex:1;flex-direction:column;min-height:0}
 .cc-root [data-cc-panel="consent"] .cc-title, .cc-root [data-cc-panel="consent"] .cc-toggles {flex-shrink:0}
 .cc-root #ccDescription {flex:0 1 auto;min-height:2.9em;overflow-y:auto}
}
