/* Cookie consent banner and preferences panel. */
.vsk-banner,
.vsk-dialog {
    --vsk-ink: #111827;
    --vsk-muted: #4b5563;
    --vsk-line: #e5e7eb;
    --vsk-soft: #f9fafb;
    --vsk-brand: #6366f1;
    --vsk-brand-dark: #4f46e5;
    font-family: inherit;
    color: var(--vsk-ink);
    box-sizing: border-box;
}

.vsk-banner *,
.vsk-dialog * {
    box-sizing: border-box;
}

.vsk-banner[hidden],
.vsk-cat__text[hidden] {
    display: none !important;
}

.vsk-banner {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 2147483000;
    width: min(440px, calc(100vw - 32px));
    padding: 22px 22px 20px;
    background: #fff;
    border: 1px solid var(--vsk-line);
    border-radius: 16px;
    box-shadow: 0 20px 50px -12px rgba(17, 24, 39, .25), 0 4px 12px rgba(17, 24, 39, .06);
    animation: vsk-in .35s ease-out both;
}

.vsk-banner--notice {
    width: min(400px, calc(100vw - 32px));
    padding: 18px 18px 16px;
}

@keyframes vsk-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .vsk-banner { animation: none; }
}

.vsk-title {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: -.01em;
}

.vsk-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--vsk-muted);
}

.vsk-text a,
.vsk-more a,
.vsk-link {
    color: var(--vsk-brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.vsk-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.vsk-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.vsk-banner--notice .vsk-actions {
    justify-content: flex-end;
    margin-top: 12px;
}

.vsk-btn {
    flex: 1 1 0;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--vsk-brand);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s, color .15s, border-color .15s;
}

.vsk-banner--notice .vsk-btn {
    flex: 0 0 auto;
    min-width: 96px;
}

.vsk-btn--solid {
    background: var(--vsk-brand);
    color: #fff;
}

.vsk-btn--solid:hover {
    background: var(--vsk-brand-dark);
    border-color: var(--vsk-brand-dark);
}

.vsk-btn--outline {
    background: #fff;
    color: var(--vsk-brand);
}

.vsk-btn--outline:hover {
    background: #eef2ff;
}

.vsk-btn--ghost {
    background: #fff;
    color: var(--vsk-ink);
    border-color: var(--vsk-line);
}

.vsk-btn--ghost:hover {
    background: var(--vsk-soft);
}

.vsk-btn:focus-visible,
.vsk-link:focus-visible,
.vsk-close:focus-visible,
.vsk-cat__toggle:focus-visible,
.vsk-switch input:focus-visible + .vsk-switch__track {
    outline: 2px solid var(--vsk-brand);
    outline-offset: 2px;
}

.vsk-dialog {
    position: fixed;
    inset: auto auto 24px 24px;
    margin: 0;
    z-index: 2147483001;
    width: min(460px, calc(100vw - 32px));
    max-height: min(640px, calc(100vh - 48px));
    padding: 0;
    border: 1px solid var(--vsk-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 50px -12px rgba(17, 24, 39, .3), 0 4px 12px rgba(17, 24, 39, .06);
    overflow: hidden;
}

.vsk-dialog[open] {
    display: flex;
    flex-direction: column;
    animation: vsk-in .3s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    .vsk-dialog[open] { animation: none; }
}

.vsk-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--vsk-line);
}

.vsk-dialog__head .vsk-title {
    margin: 0;
    font-size: 18px;
}

.vsk-close {
    display: inline-flex;
    padding: 6px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--vsk-muted);
    cursor: pointer;
}

.vsk-close:hover {
    background: var(--vsk-soft);
    color: var(--vsk-ink);
}

.vsk-dialog__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px 20px 4px;
}

.vsk-intro p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--vsk-muted);
}

.vsk-intro .vsk-more {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vsk-intro.is-open .vsk-more {
    display: block;
}

.vsk-intro .vsk-link {
    font-size: 14px;
    margin-bottom: 14px;
}

.vsk-cat {
    border-top: 1px solid var(--vsk-line);
    padding: 14px 0;
}

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

.vsk-cat__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--vsk-ink);
    cursor: pointer;
    text-align: left;
}

.vsk-chevron {
    flex: none;
    color: var(--vsk-muted);
    transition: transform .2s;
}

.vsk-cat__toggle[aria-expanded="true"] .vsk-chevron {
    transform: rotate(90deg);
}

.vsk-cat__text {
    margin: 8px 0 0 24px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--vsk-muted);
}

.vsk-always {
    font-size: 13px;
    font-weight: 600;
    color: var(--vsk-brand);
}

.vsk-switch {
    position: relative;
    display: inline-flex;
    flex: none;
    cursor: pointer;
}

.vsk-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.vsk-switch__track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #d1d5db;
    transition: background-color .2s;
}

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

.vsk-switch input:checked + .vsk-switch__track {
    background: var(--vsk-brand);
}

.vsk-switch input:checked + .vsk-switch__track::after {
    transform: translateX(18px);
}

.vsk-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.vsk-dialog__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px 16px;
    border-top: 1px solid var(--vsk-line);
    background: var(--vsk-soft);
}

.vsk-dialog__foot [data-vsk="save"] {
    order: 3;
    flex-basis: 100%;
}

@media (max-width: 640px) {
    .vsk-dialog {
        inset: auto 16px 16px 16px;
        width: auto;
        max-height: calc(100vh - 32px);
    }

    .vsk-banner {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        padding: 18px 16px 16px;
    }

    .vsk-banner:not(.vsk-banner--notice) .vsk-actions {
        flex-wrap: wrap;
    }

    .vsk-banner:not(.vsk-banner--notice) .vsk-btn--ghost {
        order: 3;
        flex-basis: 100%;
    }

    .vsk-dialog__head,
    .vsk-dialog__body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .vsk-dialog__foot {
        padding: 12px 18px 16px;
    }
}
