body.cookie-banner-open {
    overflow: hidden;
}

.cookie-banner {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 99999;
    background: #ffffff;
    border: 1px solid #e2e6eb;
    border-radius: 20px;
    padding: 24px;
    max-width: 605px;
    width: calc(100vw - 48px);
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(33, 49, 69, 0.14), 0 2px 10px rgba(33, 49, 69, 0.04);
    font-family: inherit;
    color: var(--color-text-main, #2e2e2e);
    box-sizing: border-box;
}

.cookie-banner--preferences {
    max-width: min(720px, calc(100vw - 48px));
}

.cookie-banner *,
.cookie-banner *::before,
.cookie-banner *::after {
    box-sizing: border-box;
}

.cookie-banner__title {
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-blue-deep, #213145);
    margin: 0 0 8px 0;
}

.cookie-banner__text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-text-secondary, #6c6c6b);
    margin: 0 0 20px 0;
}

.cookie-banner__text a,
.cookie-banner__link {
    color: var(--color-blue-deep, #213145);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cookie-banner__text a:hover,
.cookie-banner__link:hover {
    color: var(--color-green-light, #4d876a);
}

.cookie-banner__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.cookie-banner .btn {
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    height: auto;
    min-height: 40px;
    padding: 9px 20px;
    border-radius: 9999px;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    outline: none;
    box-shadow: none;
    gap: 6px;
}

.cookie-banner .btn:focus-visible {
    outline: 2px solid var(--color-blue-deep, #213145);
    outline-offset: 2px;
}

.cookie-banner .btn--primary,
.cookie-banner .btn--main {
    background-color: var(--color-green-dark);
    border-color: var(--color-green-dark);
    color: #ffffff;
}

.cookie-banner .btn--primary:hover,
.cookie-banner .btn--main:hover {
    background-color: var(--color-green-dark);
    border-color: var(--color-green-dark);
    color: #ffffff;
}

.cookie-banner .btn--secondary {
    background-color: #f7f8fa;
    border-color: #dbe0e6;
    color: var(--color-text-main, #2e2e2e);
}

.cookie-banner .btn--secondary:hover {
    background-color: var(--color-green-dark);
    border-color: var(--color-green-dark);
    color: #ffffff;
}

.cookie-banner__preferences {
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.cookie-banner__preferences:not([hidden]) {
    display: flex;
}

.cookie-banner__preferences-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}

.cookie-banner__close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid #e1e4e8;
    border-radius: 50%;
    background: #f7f8fa;
    color: var(--color-text-secondary, #6c6c6b);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.cookie-banner__close span {
    display: flex;
}

.cookie-banner__close:hover {
    background: #e9ecef;
    color: var(--color-blue-deep, #213145);
    border-color: #d5d9de;
}

.cookie-banner__preferences-intro {
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-secondary, #6c6c6b);
    margin: 0 0 16px 0;
}

.cookie-banner__categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    margin-bottom: 16px;
    padding-right: 6px;
}

.cookie-category {
    border: 1px solid #e5e8ec;
    border-radius: 14px;
    padding: 16px;
    background: #fafbfc;
    transition: border-color 0.2s ease;
}

.cookie-category--locked {
    background: #ffffff;
}

.cookie-category__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.cookie-category__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cookie-category__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-blue-deep, #213145);
    margin: 0;
}

.cookie-category__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 999px;
    background: #edf4f0;
    color: var(--color-green-dark, #264646);
}

.cookie-category__badge--locked {
    background: #eaf1f9;
    color: var(--color-blue-deep, #213145);
}

.cookie-category__icon {
    flex-shrink: 0;
}

.cookie-category__description {
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text-secondary, #6c6c6b);
    margin: 0 0 8px 0;
}

.cookie-category__examples {
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-text-secondary, #6c6c6b);
    margin: 0 0 8px 0;
}

.cookie-category__examples-label {
    font-weight: 600;
    margin-right: 4px;
}

.cookie-category__details-toggle {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--color-blue-deep, #213145);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.cookie-category__details-toggle:hover {
    color: var(--color-green-light, #4d876a);
}

.cookie-category__details-toggle--open {
    margin-bottom: 10px;
}

.cookie-category__details {
    margin-top: 10px;
}

.cookie-category__table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e6eb;
    border-radius: 10px;
    background: #ffffff;
}

.cookie-category__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 460px;
}

.cookie-category__table th,
.cookie-category__table td {
    padding: 9px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #edf1f5;
}

.cookie-category__table th {
    font-weight: 600;
    color: var(--color-blue-deep, #213145);
    background: #f5f7fa;
}

.cookie-category__table tr:last-child td {
    border-bottom: 0;
}

.cookie-category__table code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    background: #f0f2f5;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--color-blue-deep, #213145);
}

.cookie-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
}

.cookie-toggle--locked {
    cursor: default;
}

.cookie-toggle__track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #d3d7de;
    transition: background-color 0.25s ease;
}

.cookie-toggle__track--on {
    background: var(--color-green-light, #4d876a);
}

.cookie-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease;
}

.cookie-toggle__track--on .cookie-toggle__thumb {
    transform: translateX(20px);
}

.cookie-toggle__label {
    font-size: 12px;
    font-weight: 700;
    min-width: 24px;
    color: var(--color-text-secondary, #6c6c6b);
}

.cookie-toggle__input:focus-visible + .cookie-toggle__track {
    outline: 2px solid var(--color-blue-deep, #213145);
    outline-offset: 2px;
}

.cookie-banner__preferences-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #edf1f5;
}

.cookie-banner__preferences-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--color-text-secondary, #6c6c6b);
}

.cookie-banner__preferences-footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.cookie-banner__preferences-footer a:hover {
    color: var(--color-blue-deep, #213145);
}

.cookie-banner__footer-sep {
    opacity: 0.5;
}

.cookie-banner .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.cookie-banner__categories::-webkit-scrollbar {
    width: 6px;
}

.cookie-banner__categories::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 4px;
}

.cookie-banner__categories::-webkit-scrollbar-thumb {
    background: #c5cbd3;
    border-radius: 4px;
}

.cookie-banner__categories::-webkit-scrollbar-thumb:hover {
    background: #a8b0bc;
}

@media (max-width: 600px) {
    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-height: calc(100dvh - 24px);
        padding: 18px;
        border-radius: 16px;
    }

    .cookie-banner__actions,
    .cookie-banner__preferences-actions {
        justify-content: stretch;
        gap: 8px;
    }

    .cookie-banner__actions .btn,
    .cookie-banner__preferences-actions .btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        padding: 8px 12px;
        font-size: 13px;
    }

    .cookie-banner__actions .btn:last-child {
        flex-basis: 100%;
        order: -1;
    }
}
