/* ==========================================================================
   Согласия в формах, капча и уведомление о cookie
   ========================================================================== */

/* --- Чекбоксы согласия --- */
.form-consent {
    margin: 12px 0 6px;
    text-align: left;
}

.form-consent__item {
    position: relative;
    display: block;
    margin-bottom: 8px;
    padding-left: 26px;
    font-size: 13px;
    line-height: 1.35;
    color: #555;
    cursor: pointer;
}

.form-consent__item input[type="checkbox"] {
    position: absolute;
    top: 2px;
    left: 0;
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.form-consent__item a {
    color: #22519f;
    text-decoration: underline;
}

.form-consent__item a:hover {
    color: #17397a;
}

.form-consent__item.is-invalid {
    color: #c0392b;
}

.form-consent__item.is-invalid a {
    color: #c0392b;
}

.form-required-note {
    margin: 4px 0 12px;
    font-size: 12px;
    color: #888;
}

/* --- Капча --- */
.form-captcha {
    margin: 12px 0;
    min-height: 20px;
}

.form-captcha .smart-captcha {
    max-width: 100%;
}

.form-captcha__error {
    display: none;
    margin-top: 6px;
    font-size: 13px;
    color: #c0392b;
}

.form-captcha__error.is-visible {
    display: block;
}

/* --- Плашка о cookie --- */
.cookie-notice {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10000;
    display: none;
    box-sizing: border-box;
    width: 420px;
    max-width: calc(100% - 40px);
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
    font-size: 13px;
    line-height: 1.45;
    color: #333;
}

.cookie-notice.is-visible {
    display: block;
}

.cookie-notice__text {
    margin: 0 0 14px;
}

.cookie-notice__text a {
    color: #22519f;
    text-decoration: underline;
}

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

.cookie-notice__btn {
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.cookie-notice__btn--accept {
    background: #22519f;
    border-color: #22519f;
    color: #fff;
}

.cookie-notice__btn--accept:hover {
    background: #17397a;
    border-color: #17397a;
}

.cookie-notice__btn--decline {
    background: #fff;
    border-color: #c4c4c4;
    color: #333;
}

.cookie-notice__btn--decline:hover {
    background: #f2f2f2;
}

@media (max-width: 600px) {
    .cookie-notice {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        padding: 14px 16px;
    }

    .cookie-notice__actions {
        display: block;
    }

    .cookie-notice__btn {
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }
}

/* --- Ссылки в подвале --- */
.footer-legal {
    margin-top: 6px;
    font-size: 13px;
}

.footer-legal a {
    margin-right: 16px;
    color: #fff;
    text-decoration: underline;
    opacity: .85;
}

.footer-legal a:hover {
    opacity: 1;
    color: #fff;
}

/* --- Страницы правовых документов --- */
.legal-page {
    padding: 40px 0 60px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.legal-page h1 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.25;
    color: #22519f;
}

.legal-page__updated {
    margin-bottom: 30px;
    font-size: 13px;
    color: #888;
}

.legal-page h2 {
    margin: 32px 0 12px;
    font-size: 19px;
    line-height: 1.3;
    color: #1c1919;
}

.legal-page p {
    margin: 0 0 12px;
}

.legal-page ul,
.legal-page ol {
    margin: 0 0 12px;
    padding-left: 22px;
}

.legal-page li {
    margin-bottom: 6px;
}

.legal-page a {
    color: #22519f;
    text-decoration: underline;
}

.legal-page__back {
    display: inline-block;
    margin-bottom: 24px;
    color: #22519f;
    text-decoration: none;
    font-size: 14px;
}

.legal-page__back:hover {
    color: #17397a;
    text-decoration: underline;
}

.legal-header {
    padding: 18px 0;
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
}

.legal-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.legal-header__contacts {
    text-align: right;
    font-size: 14px;
    line-height: 1.4;
}

.legal-header__contacts a {
    color: #1c1919;
    text-decoration: none;
    font-weight: 700;
}

.legal-header__contacts span {
    display: block;
    color: #777;
    font-size: 13px;
}

.legal-footer {
    padding: 24px 0;
    background: #1c1919;
    color: #fff;
    font-size: 13px;
}

.legal-footer a {
    margin-left: 16px;
    color: #fff;
    text-decoration: underline;
    opacity: .85;
}

.legal-footer a:hover {
    opacity: 1;
    color: #fff;
}

@media (max-width: 600px) {
    .legal-header__row,
    .legal-header__contacts {
        text-align: left;
    }

    .legal-page h1 {
        font-size: 23px;
    }
}

.legal-page h3 {
    margin: 22px 0 10px;
    font-size: 16px;
    line-height: 1.35;
    color: #1c1919;
}

.legal-page__doc-link {
    margin: 0 0 28px;
    font-size: 14px;
}

.legal-page__requisites {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #777;
}

.legal-list--plain {
    list-style: none;
    padding-left: 0;
}

.legal-list--plain li {
    margin-bottom: 4px;
}

.legal-page p,
.legal-page li,
.legal-page strong {
    color: #333;
}

/* --- Поле-ловушка для ботов: не должно быть видно посетителю --- */
.hhru {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* --- Попап под ширину виджета капчи (302px + отступы) --- */
.mfp-auto-cursor .mfp-content {
    width: 100%;
    max-width: 370px;
}

.form-captcha {
    display: flex;
    justify-content: center;
}

.form-captcha__error {
    width: 100%;
    text-align: left;
}

/* На узких экранах виджет капчи (фиксированные 302px) не помещается —
   ужимаем отступы попапа и масштабируем сам виджет */
@media (max-width: 400px) {
    .white-popup-block {
        padding: 26px 12px;
    }

    .form-captcha {
        max-width: 100%;
        overflow: hidden;
        justify-content: flex-start;
    }

    .form-captcha .js-captcha {
        transform: scale(.85);
        transform-origin: 0 0;
        height: 88px;
    }
}
