/* Void Cookie Consent
 * Cookiebot-inspired centered dialog. Modern, minimal, accessible.
 */

.vcc-root {
    --vcc-bg: #ffffff;
    --vcc-fg: #15171c;
    --vcc-muted: #4b5563;
    --vcc-border: #e6e8ee;
    --vcc-primary: #2f37f6;
    --vcc-primary-hover: #1f27e0;
    --vcc-primary-fg: #ffffff;
    --vcc-secondary: #eef0f6;
    --vcc-radius: 10px;
    --vcc-shadow: 0 20px 60px rgba(16, 24, 40, 0.28);

    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--vcc-fg);
    line-height: 1.55;
}

.vcc-root[data-vcc-hidden="true"] {
    display: none;
}

/* The hidden attribute must always win over the display rules below
 * (a class like .vcc-overlay { display: flex } otherwise overrides the
 * user-agent [hidden] { display: none } rule, leaving elements visible). */
.vcc-root [hidden],
.vcc-root[hidden] {
    display: none !important;
}

.vcc-root .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Overlay + modal ---------- */
.vcc-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(20, 24, 40, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.vcc-modal {
    width: min(820px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: var(--vcc-bg);
    border-radius: var(--vcc-radius);
    box-shadow: var(--vcc-shadow);
    display: flex;
    flex-direction: column;
}

/* ---------- Brand bar ---------- */
.vcc-modal__brandbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 28px;
}

.vcc-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--vcc-fg);
}

.vcc-brand__name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--vcc-fg);
}

.vcc-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--vcc-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.vcc-close:hover {
    background: var(--vcc-secondary);
    color: var(--vcc-fg);
}

.vcc-close:focus-visible {
    outline: 3px solid rgba(47, 55, 246, 0.45);
    outline-offset: 2px;
}

/* ---------- Tabs ---------- */
.vcc-tabs {
    display: flex;
    border-bottom: 1px solid var(--vcc-border);
    padding: 0 16px;
}

.vcc-tab {
    flex: 1 1 0;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--vcc-muted);
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    padding: 16px 12px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.vcc-tab:hover {
    color: var(--vcc-fg);
}

.vcc-tab.is-active {
    color: var(--vcc-primary);
    border-bottom-color: var(--vcc-primary);
}

.vcc-tab:focus-visible {
    outline: 3px solid rgba(47, 55, 246, 0.4);
    outline-offset: -3px;
    border-radius: 4px;
}

/* ---------- Panels ---------- */
.vcc-panel {
    display: none;
    flex-direction: column;
}

.vcc-panel.is-active {
    display: flex;
}

.vcc-panel:focus {
    outline: none;
}

.vcc-modal__body {
    padding: 24px 28px 8px;
}

.vcc-root h2.vcc-modal__title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    line-height: 1.55 !important;
    color: var(--vcc-fg) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.vcc-modal__text {
    margin: 0 0 12px;
    font-size: 0.92rem;
    color: var(--vcc-muted);
}

.vcc-link {
    color: var(--vcc-primary);
    text-decoration: underline;
}

/* ---------- GPC notice (sits left of the footer buttons) ---------- */
.vcc-gpc {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    font-size: 0.9rem;
    font-weight: 600;
}

.vcc-gpc__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--vcc-fg);
    color: #fff;
    font-size: 0.8rem;
    flex: 0 0 auto;
}

/* ---------- Footer + buttons ---------- */
.vcc-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 28px 24px;
    flex-wrap: wrap;
}

.vcc-footer-spacer {
    flex: 1 1 auto;
}

.vcc-btn {
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 13px 28px;
    border-radius: var(--vcc-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
    white-space: nowrap;
}

.vcc-btn:active {
    transform: translateY(1px);
}

.vcc-btn:focus-visible {
    outline: 3px solid rgba(47, 55, 246, 0.45);
    outline-offset: 2px;
}

.vcc-btn--primary {
    background: var(--vcc-primary);
    color: var(--vcc-primary-fg);
}

.vcc-btn--primary:hover {
    background: var(--vcc-primary-hover);
}

.vcc-btn--secondary {
    background: var(--vcc-secondary);
    color: var(--vcc-fg);
}

.vcc-btn--secondary:hover {
    background: #e3e6f0;
}

.vcc-btn--ghost {
    background: transparent;
    color: var(--vcc-muted);
    border-color: var(--vcc-border);
}

.vcc-btn--ghost:hover {
    background: var(--vcc-secondary);
    color: var(--vcc-fg);
}

/* ---------- Options (Details tab) ---------- */
.vcc-option {
    border: 0;
    margin: 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--vcc-border);
}

.vcc-option:last-child {
    border-bottom: 0;
}

.vcc-option__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.vcc-option__title {
    font-size: 0.98rem;
    font-weight: 700;
    padding: 0;
}

.vcc-option__desc {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: var(--vcc-muted);
}

/* ---------- Toggle switch ---------- */
.vcc-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    cursor: pointer;
}

.vcc-switch input {
    position: absolute;
    opacity: 0;
    width: 44px;
    height: 24px;
    margin: 0;
    cursor: pointer;
}

.vcc-switch__slider {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #c7ccdb;
    position: relative;
    transition: background-color 0.15s ease;
}

.vcc-switch__slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease;
}

.vcc-switch input:checked + .vcc-switch__slider {
    background: var(--vcc-primary);
}

.vcc-switch input:checked + .vcc-switch__slider::after {
    transform: translateX(20px);
}

.vcc-switch input:focus-visible + .vcc-switch__slider {
    outline: 3px solid rgba(47, 55, 246, 0.45);
    outline-offset: 2px;
}

.vcc-switch--locked {
    cursor: not-allowed;
    opacity: 0.85;
}

.vcc-switch--locked input {
    cursor: not-allowed;
}

/* ---------- Floating settings button ---------- */
.vcc-settings-toggle {
    position: fixed;
    z-index: 99997;
    left: 20px;
    bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--vcc-fg);
    background: var(--vcc-bg);
    border: 1px solid var(--vcc-border);
    border-radius: 50%;
    padding: 0;
    box-shadow: var(--vcc-shadow);
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.vcc-settings-toggle:hover {
    background: var(--vcc-secondary);
}

.vcc-settings-toggle:active {
    transform: translateY(1px);
}

.vcc-settings-toggle:focus-visible {
    outline: 3px solid rgba(47, 55, 246, 0.45);
    outline-offset: 2px;
}

.vcc-settings-toggle__icon {
    font-size: 1.35rem;
    line-height: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .vcc-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .vcc-modal {
        width: 100%;
        max-height: 92vh;
        border-radius: var(--vcc-radius) var(--vcc-radius) 0 0;
    }

    .vcc-modal__brandbar,
    .vcc-modal__body,
    .vcc-gpc,
    .vcc-modal__footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .vcc-modal__footer .vcc-btn {
        flex: 1 1 auto;
    }

    .vcc-footer-spacer {
        display: none;
    }

    .vcc-tab {
        padding: 14px 6px;
        font-size: 0.9rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .vcc-root * {
        transition: none !important;
    }
}
