/* CookieConsent layout — colours come from cookie-consent-theme.css */
.cc-root {
    position: fixed;
    z-index: 2147483000;
    left: 50%;
    right: auto;
    bottom: 0;
    width: 100%;
    max-width: var(--cc-card-max-width, 1140px);
    transform: translateX(-50%);
    padding: var(--cc-overlay-pad, 16px) 15px;
    font-family: var(--cc-font);
    color: var(--cc-text);
    box-sizing: border-box;
    pointer-events: none;
}
.cc-root *,
.cc-root *::before,
.cc-root *::after { box-sizing: border-box; }

.cc-card {
    pointer-events: auto;
    position: relative;
    width: 100%;
    max-width: none;
    max-height: min(90vh, 720px);
    overflow-y: auto;
    margin: 0;
    background: var(--cc-bg);
    border: 1px solid var(--cc-card-border);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-card-shadow);
    padding: 22px 24px 20px;
}

/* Match Bootstrap .container widths */
@media (min-width: 576px) {
    .cc-root { max-width: 540px; }
}
@media (min-width: 768px) {
    .cc-root { max-width: 720px; }
}
@media (min-width: 992px) {
    .cc-root { max-width: 960px; }
}
@media (min-width: 1200px) {
    .cc-root { max-width: var(--cc-card-max-width, 1140px); }
}

.cc-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--cc-close-color);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
}
.cc-close:hover,
.cc-close:focus-visible {
    background: var(--cc-close-hover-bg);
    color: var(--cc-text);
    outline: none;
}

.cc-kicker {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cc-kicker-color);
    margin-bottom: 6px;
}
.cc-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    padding-right: 28px;
    color: var(--cc-title-color);
}
.cc-text {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--cc-body-color);
    max-width: none;
    width: 100%;
}
.cc-text a {
    color: var(--cc-link-color) !important;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--cc-link-underline);
}
.cc-text a:hover { color: var(--cc-accent-hover); border-bottom-color: var(--cc-accent-hover); }

.cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cc-btn {
    appearance: none;
    -webkit-appearance: none;
    min-height: 42px;
    min-width: 132px;
    padding: 8px 16px;
    border-radius: 0px;
    border: 2px solid var(--cc-text);
    background: #fff;
    color: var(--cc-text);
    font: 700 13px/1.2 var(--cc-font);
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.cc-btn:hover { transform: translateY(-1px); }
.cc-btn:focus-visible {
    outline: 2px solid var(--cc-accent);
    outline-offset: 2px;
}

.cc-btn-reject {
    background: var(--cc-btn-reject-bg);
    color: var(--cc-btn-reject-text);
    border-color: var(--cc-btn-reject-border);
}
.cc-btn-reject:hover { background: var(--cc-btn-reject-hover-bg); }

.cc-btn-accept {
    background: var(--cc-btn-accept-bg);
    color: var(--cc-btn-accept-text);
    border-color: var(--cc-btn-accept-border);
}
.cc-btn-accept:hover { background: var(--cc-btn-accept-hover-bg); }

.cc-btn-customize {
    background: var(--cc-btn-customize-bg);
    color: var(--cc-btn-customize-text);
    border-color: var(--cc-btn-customize-border);
}
.cc-btn-customize:hover { background: var(--cc-btn-customize-hover-bg); }

.cc-btn-save {
    background: var(--cc-btn-save-bg);
    border-color: var(--cc-btn-save-border);
    color: var(--cc-btn-save-text);
    min-width: 160px;
}
.cc-btn-save:hover { filter: brightness(0.95); }

.cc-panel {
    display: none;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--cc-card-border);
}
.cc-panel.is-open { display: block; }

.cc-cat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cc-card-border);
}
.cc-cat:last-of-type { border-bottom: 0; }
.cc-cat-copy { min-width: 0; flex: 1; }
.cc-cat-name {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 3px;
}
.cc-cat-desc {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--cc-text-muted);
}

.cc-switch {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 26px;
    margin-top: 2px;
}
.cc-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch-ui {
    position: absolute;
    inset: 0;
    background: var(--cc-switch-off);
    border-radius: 999px;
    transition: background 0.2s ease;
}
.cc-switch-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--cc-switch-knob);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(21, 33, 42, 0.25);
    transition: transform 0.2s ease;
}
.cc-switch input:checked + .cc-switch-ui { background: var(--cc-switch-on); }
.cc-switch input:checked + .cc-switch-ui::after { transform: translateX(18px); }
.cc-switch input:disabled + .cc-switch-ui { background: var(--cc-switch-disabled); }
.cc-switch input:focus-visible + .cc-switch-ui {
    outline: 2px solid var(--cc-accent);
    outline-offset: 2px;
}

.cc-panel-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.cc-reopen {
    position: fixed;
    z-index: 2147482999;
    left: 16px;
    bottom: 16px;
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px 8px 10px;
    border: 1px solid var(--cc-reopen-border);
    border-radius: 999px;
    background: var(--cc-reopen-bg);
    color: var(--cc-reopen-text);
    font: 700 12px/1 var(--cc-font);
    box-shadow: var(--cc-reopen-shadow);
    cursor: pointer;
}
.cc-reopen.is-visible { display: inline-flex; }
.cc-reopen:hover { transform: translateY(-1px); }
.cc-reopen:focus-visible {
    outline: 2px solid var(--cc-accent);
    outline-offset: 2px;
}
.cc-reopen svg {
    width: 18px;
    height: 18px;
    fill: var(--cc-reopen-icon);
}

@media (max-width: 640px) {
    .cc-root { padding: 10px 15px; }
    .cc-card { padding: 18px 16px 16px; }
    .cc-actions { flex-direction: column; }
    .cc-btn { width: 100%; min-width: 0; }
    .cc-reopen span { display: none; }
    .cc-reopen { padding: 10px; left: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .cc-btn,
    .cc-switch-ui,
    .cc-switch-ui::after,
    .cc-reopen { transition: none !important; }
}
