.footer-cookie-settings {
    padding: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    background: transparent;
    border: 0;
    cursor: pointer;
}
/* ======================================================
   COOKIE CONSENT
====================================================== */

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

.cookie-consent {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 24px;
    font-family: Arial, Helvetica, sans-serif;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition:
            opacity 0.25s ease,
            visibility 0.25s ease;
}

.cookie-consent.is-visible {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}

.cookie-consent__dialog {
    position: relative;
    width: 100%;
    max-width: 465px;
    max-height: calc(100dvh - 48px);
    padding: 30px 24px;
    overflow-y: auto;
    color: #171717;
    background: #f4f6ff;
    border: 1px solid rgba(218, 224, 246, 0.9);
    border-radius: 24px;
    box-shadow:
            0 22px 60px rgba(0, 0, 0, 0.18),
            0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(16px);
    transition: transform 0.25s ease;
    scrollbar-width: thin;
}

.cookie-consent.is-visible .cookie-consent__dialog {
    transform: translateY(0);
}

.cookie-consent__screen[hidden] {
    display: none;
}

.cookie-consent__title {
    max-width: calc(100% - 40px);
    margin: 0 0 12px;
    font: inherit;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #171717;
}

.cookie-consent__description {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.32;
    color: #171717;
}

.cookie-consent__policy {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.cookie-consent__policy:hover {
    text-decoration-thickness: 2px;
}

.cookie-consent__close {
    position: absolute;
    top: 21px;
    right: 21px;
    z-index: 2;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition:
            background-color 0.2s ease,
            transform 0.2s ease;
}

.cookie-consent__close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.cookie-consent__close:active {
    transform: scale(0.92);
}

.cookie-consent__close span::before,
.cookie-consent__close span::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    content: "";
    background: #171717;
    border-radius: 10px;
}

.cookie-consent__close span::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.cookie-consent__close span::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Кнопки */

.cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 30px;
}

.cookie-consent__button {
    min-height: 48px;
    padding: 11px 17px;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    color: #171717;
    white-space: nowrap;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition:
            background-color 0.2s ease,
            color 0.2s ease,
            border-color 0.2s ease,
            transform 0.2s ease,
            box-shadow 0.2s ease;
}

.cookie-consent__button:hover {
    transform: translateY(-1px);
}

.cookie-consent__button:active {
    transform: translateY(0);
}

.cookie-consent__button--primary {
    color: #ffffff;
    background: #151515;
    border-color: #151515;
}

.cookie-consent__button--primary:hover {
    background: #2b2b2b;
    border-color: #2b2b2b;
}

.cookie-consent__button--outline {
    background: transparent;
    border-color: #171717;
}

.cookie-consent__button--outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cookie-consent__button--light {
    background: #ffffff;
    border-color: #ffffff;
}

.cookie-consent__button--light:hover {
    background: #eceef7;
    border-color: #eceef7;
}

/*.cookie-consent__actions .cookie-consent__button--light {*/
/*    grid-column: 1 / -1;*/
/*}*/

/* Настройки */

.cookie-consent__options {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.cookie-consent__option {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 14px;
    align-items: flex-start;
    cursor: pointer;
}

.cookie-consent__checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}

.cookie-consent__checkmark {
    position: relative;
    display: block;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 3px solid #202020;
    border-radius: 5px;
    transition:
            background-color 0.2s ease,
            border-color 0.2s ease,
            box-shadow 0.2s ease;
}

.cookie-consent__checkbox:checked + .cookie-consent__checkmark {
    background: #10b654;
    border-color: #202020;
}

.cookie-consent__checkbox:checked + .cookie-consent__checkmark::after {
    position: absolute;
    top: 8px;
    left: 12px;
    width: 8px;
    height: 14px;
    content: "";
    border-right: 3px solid #ffffff;
    border-bottom: 3px solid #ffffff;
    transform: rotate(45deg);
}

.cookie-consent__checkbox:focus-visible + .cookie-consent__checkmark {
    box-shadow:
            0 0 0 3px #f4f6ff,
            0 0 0 5px #171717;
}

.cookie-consent__checkbox:disabled + .cookie-consent__checkmark {
    cursor: not-allowed;
    opacity: 0.75;
}

.cookie-consent__option-content {
    display: block;
    padding-top: 1px;
}

.cookie-consent__option-title {
    display: block;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.25;
    color: #171717;
}

.cookie-consent__option-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    color: #616161;
}

.cookie-consent__settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 30px;
}

.cookie-consent__settings-actions .cookie-consent__button {
    min-width: 104px;
}

.cookie-consent__back {
    padding: 8px 4px;
    font: inherit;
    font-size: 13px;
    color: #171717;
    text-decoration: underline;
    text-underline-offset: 3px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

/* Focus */

.cookie-consent button:focus-visible,
.cookie-consent a:focus-visible {
    outline: 2px solid #171717;
    outline-offset: 3px;
}

/* Mobile */

@media (max-width: 520px) {
    .cookie-consent {
        align-items: flex-end;
        padding: 12px;
    }

    .cookie-consent__dialog {
        max-width: none;
        max-height: calc(100dvh - 24px);
        padding: 26px 20px 22px;
        border-radius: 22px;
    }

    .cookie-consent__title {
        font-size: 22px;
    }

    .cookie-consent__description {
        font-size: 13px;
        line-height: 1.35;
    }

    .cookie-consent__actions {
        grid-template-columns: 1fr;
        margin-top: 24px;
    }

    .cookie-consent__actions .cookie-consent__button--light {
        grid-column: auto;
    }

    .cookie-consent__button {
        width: 100%;
        min-height: 46px;
    }

    .cookie-consent__settings-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .cookie-consent__settings-actions .cookie-consent__button {
        width: 100%;
        min-width: 0;
    }

    .cookie-consent__back {
        grid-column: 1 / -1;
        justify-self: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent,
    .cookie-consent__dialog,
    .cookie-consent__button,
    .cookie-consent__close {
        transition: none;
    }
}