.cookie-settings-open {
    overflow: hidden;
}

.cookie-consent[hidden],
.cookie-settings[hidden] {
    display: none;
}

.cookie-consent {
    position: fixed;
    z-index: 10000;
    right: 20px;
    bottom: 20px;
    left: 20px;
}

.cookie-consent__panel {
    display: flex;
    align-items: center;
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px;
    color: var(--gray-100, #f3f5f8);
    background: #171b24;
    border: 1px solid #323949;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
}

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

.cookie-consent__title {
    margin: 0 0 6px;
    color: #fff;
    font-size: 18px;
}

.cookie-consent__text {
    margin: 0;
    color: #c4c9d4;
    font-size: 14px;
    line-height: 1.55;
}

.cookie-consent a,
.cookie-settings a {
    color: #8eafff;
}

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

.cookie-consent__button,
.cookie-consent__settings {
    min-height: 40px;
    padding: 9px 15px;
    color: #eef1f6;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    background: transparent;
    border: 1px solid #4a5263;
    border-radius: 8px;
    cursor: pointer;
}

.cookie-consent__button--primary {
    color: #fff;
    background: var(--primary, #5b8cff);
    border-color: var(--primary, #5b8cff);
}

.cookie-consent__settings {
    padding-right: 4px;
    padding-left: 4px;
    color: #aeb6c5;
    border-color: transparent;
}

.cookie-consent__button:focus-visible,
.cookie-consent__settings:focus-visible,
.cookie-settings__close:focus-visible {
    outline: 3px solid rgba(91, 140, 255, .45);
    outline-offset: 2px;
}

.cookie-settings {
    position: fixed;
    z-index: 10001;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.cookie-settings__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 13, .72);
}

.cookie-settings__dialog {
    position: relative;
    width: min(100%, 600px);
    max-height: calc(100vh - 40px);
    padding: 28px;
    overflow-y: auto;
    color: #202633;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.cookie-settings__dialog h2 {
    margin: 0 40px 8px 0;
    color: #151a23;
    font-size: 24px;
}

.cookie-settings__dialog > p {
    margin: 0 0 22px;
    color: #5d6675;
}

.cookie-settings__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    color: #4d5665;
    font-size: 28px;
    line-height: 1;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.cookie-settings__category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid #e3e7ed;
}

.cookie-settings__category strong,
.cookie-settings__category span {
    display: block;
}

.cookie-settings__category span {
    margin-top: 4px;
    color: #667080;
    font-size: 13px;
}

.cookie-settings__category input {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    accent-color: var(--primary, #5b8cff);
}

.cookie-settings__status {
    flex: 0 0 auto;
    color: #327a4d !important;
    font-weight: 600;
}

.cookie-settings__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid #e3e7ed;
}

.analytics-widgets {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 50px;
    margin-top: 22px;
    padding-top: 22px;
    overflow-x: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.analytics-widgets[hidden] {
    display: none;
}

.analytics-widgets > * {
    flex: 0 0 auto;
}

.analytics-widgets .ya-share2__list {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
}

@media (max-width: 920px) {
    .analytics-widgets {
        justify-content: flex-start;
        gap: 16px;
    }
}

@media (max-width: 760px) {
    .cookie-consent {
        right: 10px;
        bottom: 10px;
        left: 10px;
    }

    .cookie-consent__panel,
    .cookie-consent__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .cookie-consent__actions {
        margin: 16px 0 0;
    }

    .cookie-consent__button,
    .cookie-consent__settings {
        width: 100%;
        white-space: normal;
    }

    .cookie-settings__dialog {
        padding: 22px 18px;
    }

    .cookie-settings__category,
    .cookie-settings__footer {
        align-items: flex-start;
    }

    .cookie-settings__footer {
        flex-direction: column;
    }

    .cookie-settings__footer .cookie-consent__button {
        width: 100%;
    }
}
