.cookie-consent {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 9999;
    width: calc(100% - 48px);
    max-width: 900px;
    font-family: inherit;
    transition: transform .25s ease, opacity .25s ease;
}

.cookie-consent--hidden {
    transform: translateX(-50%) translateY(calc(100% + 40px));
    opacity: 0;
    pointer-events: none;
}

.cookie-consent__window {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.cookie-consent__view {
    display: none;
}

.cookie-consent--settings .cookie-consent__view--settings {
    display: block;
    padding: 20px 24px;
}

.cookie-consent__body { flex: 1; min-width: 0; }

.cookie-consent__title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.cookie-consent__text {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-consent__link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    color: #7cb342;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-consent__link:hover { color: #689f38; }

.cookie-consent:not(.cookie-consent--settings) .cookie-consent__view--banner {
    display: block;
    padding: 20px 24px;
}

.cookie-consent__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.cookie-consent__actions-spacer { flex: 1; }

.cookie-consent__view--settings .cookie-consent__actions {
    justify-content: flex-end;
    margin-top: 16px;
}

.cookie-consent__link--action {
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 3px;
    align-self: center;
}
.cookie-consent__link--action:hover {
    color: #689f38;
    text-decoration: underline;
}

.cookie-btn {
    flex-shrink: 0;
    border: 0;
    border-radius: 4px;
    padding: 10px 28px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    white-space: nowrap;
}
.cookie-btn--primary { background: #7cb342; color: #fff; }
.cookie-btn--primary:hover  { background: #689f38; }
.cookie-btn--primary:active { background: #5a8a31; }
.cookie-btn--ghost {
    background: #fff;
    color: #333;
    border: 1px solid #d9d9d9;
    padding: 9px 22px;
}
.cookie-btn--ghost:hover { border-color: #7cb342; color: #689f38; }

/* Настройки */
.cookie-consent__header { margin-bottom: 14px; }

.cookie-consent__categories {
    max-height: 50vh;
    overflow-y: auto;
    margin: 0 -4px;
    padding: 0 4px;
}

.cookie-category {
    background: #f7f7f7;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.cookie-category:last-child { margin-bottom: 0; }

.cookie-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.cookie-category__title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}
.cookie-category__desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.cookie-consent__body--note { margin-top: 14px; }

/* Тумблеры */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.cookie-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 9999;
    width: calc(100% - 48px);
    max-width: 900px;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 16px 20px;
    display: flex;
    align-items: stretch;
    gap: 20px;
    font-family: inherit;
    transition: transform .25s ease, opacity .25s ease;
}

.cookie-banner--hidden {
    transform: translateX(-50%) translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
}

.cookie-banner__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f1f8e9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
}

.cookie-banner__body { flex: 1; min-width: 0; }

.cookie-banner__title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.cookie-banner__text {
    margin: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-banner__link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    color: #7cb342;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-banner__link:hover { color: #689f38; }

.cookie-banner__actions {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    /* align-self: center  */
}

.cookie-btn {
    flex-shrink: 0;
    border: 0;
    border-radius: 4px;
    padding: 10px 28px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    white-space: nowrap;
}

.cookie-btn--primary {
    background: #7cb342;
    color: #fff;
}
.cookie-btn--primary:hover  { background: #689f38; }
.cookie-btn--primary:active { background: #5a8a31; }

.cookie-btn--ghost {
    background: #fff;
    color: #333;
    border: 1px solid #d9d9d9;
    padding: 9px 22px;
}
.cookie-btn--ghost:hover { border-color: #7cb342; color: #689f38; }

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: opacity .2s ease;
}
.cookie-modal--hidden { opacity: 0; pointer-events: none; }

.cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.cookie-modal__window {
    position: relative;
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.cookie-modal__title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-modal__close {
    background: none;
    border: 0;
    padding: 4px;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color .15s ease;
}
.cookie-modal__close:hover { color: #333; }

.cookie-modal__body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}

.cookie-category {
    background: #f7f7f7;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.cookie-category:last-child { margin-bottom: 0; }

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

.cookie-category__title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-category__desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.cookie-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.cookie-toggle__slider {
    position: absolute;
    inset: 0;
    background: #d9d9d9;
    border-radius: 22px;
    cursor: pointer;
    transition: background .2s ease;
}
.cookie-toggle__slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}
.cookie-toggle__input:checked + .cookie-toggle__slider { background: #7cb342; }
.cookie-toggle__input:checked + .cookie-toggle__slider::before { transform: translateX(18px); }
.cookie-toggle--disabled .cookie-toggle__slider {
    cursor: not-allowed;
    opacity: .9;
}

.cookie-modal__footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #f0f0f0;
}

.cookie-modal__note {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 14px;
}

.cookie-modal__link {
    color: #7cb342;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-modal__link:hover { color: #689f38; }

.cookie-modal__actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 640px) {
    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        transform: none;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }
    .cookie-banner--hidden {
        transform: translateY(calc(100% + 24px));
    }
    .cookie-banner__icon { display: none; }
    .cookie-banner__actions { width: 100%; }
    .cookie-banner__actions .cookie-btn {
        flex: 1;
        width: 100%;
        padding: 12px;
    }
    .cookie-banner__text { font-size: 13px; }

    .cookie-modal { padding: 12px; }
    .cookie-modal__actions { flex-direction: column; }
    .cookie-modal__actions .cookie-btn { width: 100%; padding: 12px; }
}
}
.cookie-toggle__slider {
    position: absolute;
    inset: 0;
    background: #d9d9d9;
    border-radius: 22px;
    cursor: pointer;
    transition: background .2s ease;
}
.cookie-toggle__slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}
.cookie-toggle__input:checked + .cookie-toggle__slider { background: #7cb342; }
.cookie-toggle__input:checked + .cookie-toggle__slider::before { transform: translateX(18px); }
.cookie-toggle--disabled .cookie-toggle__slider {
    cursor: not-allowed;
    opacity: .9;
}

@media (max-width: 640px) {
    .cookie-consent {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        transform: none;
    }
    .cookie-consent--hidden {
        transform: translateY(calc(100% + 24px));
    }

    .cookie-consent--settings .cookie-consent__view--settings {
        padding: 16px;
    }
    .cookie-consent__actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 8px;
    }
    .cookie-consent__actions-spacer { display: none; }
    .cookie-consent__actions .cookie-btn {
        width: 100%;
        padding: 12px;
    }
    .cookie-consent__link--action {
        align-self: center;
    }
    .cookie-consent__text { font-size: 13px; }
    .cookie-consent__categories { max-height: 60vh; }
}