/* Bottom bar consent — neblokuoja puslapio */
.ks-cookie-consent-overlay {
    --ks-cookie-accent: #171755;
    --ks-cookie-accent-hover: #6969a9;
    --ks-cookie-accent-soft: rgba(23, 23, 85, 0.12);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;
    display: none;
    padding: 0.75rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ks-cookie-consent-overlay.ks-cookie-consent--visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.ks-cookie-consent {
    pointer-events: auto;
    width: min(960px, 100%);
    margin: 0 auto;
    max-height: min(70vh, 520px);
    overflow: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.14);
    color: #1f2937;
    font-size: 0.9rem;
    line-height: 1.45;
}

.ks-cookie-consent__simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
}

.ks-cookie-consent__copy {
    min-width: 0;
    flex: 1 1 auto;
}

.ks-cookie-consent__title {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
}

.ks-cookie-consent__text {
    margin: 0;
    color: #4b5563;
    font-size: 0.86rem;
}

.ks-cookie-consent__link {
    color: var(--ks-cookie-accent);
    font-weight: 600;
    white-space: nowrap;
}

.ks-cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.ks-cookie-consent__btn {
    border-radius: 999px;
    padding: 0.5rem 1.05rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    line-height: 1.2;
}

.ks-cookie-consent__btn--deny,
.ks-cookie-consent__btn--settings,
.ks-cookie-consent__btn--selected {
    border: 1px solid var(--ks-cookie-accent);
    background: #fff;
    color: var(--ks-cookie-accent);
}

.ks-cookie-consent__btn--deny:hover,
.ks-cookie-consent__btn--settings:hover,
.ks-cookie-consent__btn--selected:hover {
    background: var(--ks-cookie-accent-soft);
}

.ks-cookie-consent__btn--allow {
    border: 1px solid var(--ks-cookie-accent);
    background: var(--ks-cookie-accent);
    color: #fff;
}

.ks-cookie-consent__btn--allow:hover {
    background: var(--ks-cookie-accent-hover);
    border-color: var(--ks-cookie-accent-hover);
}

.ks-cookie-consent__settings {
    border-top: 1px solid #e5e7eb;
    padding: 0.85rem 1.1rem 1rem;
}

.ks-cookie-consent__settings[hidden] {
    display: none !important;
}

.ks-cookie-consent__settings-lead {
    margin: 0 0 0.65rem;
    font-weight: 600;
    color: #111827;
    font-size: 0.88rem;
}

.ks-cookie-consent__toggles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.ks-cookie-consent__toggle-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.75rem 0.45rem;
    text-align: center;
    border-right: 1px solid #e5e7eb;
}

.ks-cookie-consent__toggle-col:last-child {
    border-right: none;
}

.ks-cookie-consent__toggle-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
}

.ks-cookie-consent__switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
}

.ks-cookie-consent__switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ks-cookie-consent__slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #111827;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.ks-cookie-consent__slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.ks-cookie-consent__switch input:checked + .ks-cookie-consent__slider {
    background: var(--ks-cookie-accent);
}

.ks-cookie-consent__switch input:checked + .ks-cookie-consent__slider::before {
    transform: translateX(20px);
}

.ks-cookie-consent__switch--locked .ks-cookie-consent__slider {
    background: var(--ks-cookie-accent);
    cursor: not-allowed;
    opacity: 0.85;
}

.ks-cookie-consent__details-list {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 1rem;
}

.ks-cookie-consent__details-item strong {
    display: block;
    margin-bottom: 0.15rem;
    color: #111827;
    font-size: 0.8rem;
}

.ks-cookie-consent__details-item p {
    margin: 0;
    color: #6b7280;
    font-size: 0.78rem;
}

.ks-cookie-consent__settings-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.85rem;
}

/* Fixed overlay — do NOT pad body (was a major CLS source when the bar appears). */
body.ks-cookie-consent-open {
    /* intentionally empty — kept for JS class toggle / future hooks */
}

@media (max-width: 768px) {
    .ks-cookie-consent-overlay {
        padding: 0.5rem;
    }

    .ks-cookie-consent__simple {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.85rem 0.9rem;
    }

    .ks-cookie-consent__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem;
    }

    .ks-cookie-consent__actions .ks-cookie-consent__btn--allow {
        grid-column: 1 / -1;
    }

    .ks-cookie-consent__actions .ks-cookie-consent__btn {
        width: 100%;
        text-align: center;
    }

    .ks-cookie-consent__toggles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ks-cookie-consent__toggle-col:nth-child(2) {
        border-right: none;
    }

    .ks-cookie-consent__toggle-col:nth-child(1),
    .ks-cookie-consent__toggle-col:nth-child(2) {
        border-bottom: 1px solid #e5e7eb;
    }

    .ks-cookie-consent__details-list {
        grid-template-columns: 1fr;
    }

    .ks-cookie-consent__settings-actions .ks-cookie-consent__btn {
        width: 100%;
        text-align: center;
    }
}
