/*
 * Общие стили доработок (21.10.2026).
 * Кастомный чекбокс в шаблонах оформлен только для #checkbox / #checkbox2 —
 * даём то же оформление новым чекбоксам согласия (окно заявки, подвал главной).
 */
#checkbox_pop0,
#checkbox_foot3 {
    display: none;
}
#checkbox_pop0 + label,
#checkbox_foot3 + label {
    position: absolute;
    display: block;
    width: 16px;
    height: 16px;
    top: 2px;
    margin-top: 2px;
    border: 1px solid var(--second-color);
    text-align: center;
    outline: none;
    transition: border-color .15s ease-out;
    background-color: var(--second-color);
    cursor: pointer;
}
#checkbox_pop0:checked + label:before,
#checkbox_foot3:checked + label:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 1px;
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-image: url(/bitrix/templates/agroInner/css/images/checkbox.svg);
    background-position: top 0 left 1px;
    z-index: 100;
}
/* системные чекбоксы согласия (подвал внутренних страниц, include-формы) — в фирменном цвете */
input[type="checkbox"][name="checkbox7"],
input[type="checkbox"][name="checkbox"] {
    accent-color: #303194;
}

/* строка согласия: квадрат слева, текст справа, в пределах колонки */
.agromig-popup-consent,
.agromig-foot-consent {
    align-items: flex-start;
}
.agromig-popup-consent .ch-inp,
.agromig-foot-consent .ch-inp {
    position: relative;
    flex: 0 0 26px;
    min-height: 20px;
}
.agromig-popup-consent .quik-form-wrap__agree2,
.agromig-foot-consent .quik-form-wrap__agree2 {
    margin-left: 0;
    font-size: 12px;
    line-height: 1.4;
}
.agromig-popup-consent {
    margin: 20px 0 0;
    max-width: 320px;
    padding-right: 24px;
}
.agromig-foot-consent {
    margin-top: 14px;
    max-width: 280px;
}

/* окно заявки: высота по содержимому вместо фиксированных 620px, без пустого низа */
.popup-section .popup-section__form-container {
    height: auto !important;
    padding-bottom: 36px;
}
.popup-section .popup-section__form-container > div.row:nth-of-type(4) {
    display: none;
}
.popup-section .agromig-popup-consent + button.popup-section__stroke-button {
    margin-top: 24px;
}

/* кнопка отправки неактивна, пока не отмечено согласие */
button.agromig-btn-disabled,
button.agromig-btn-disabled:hover {
    opacity: .45;
    cursor: not-allowed;
}

/* Строка согласия .mw-inp: в agroInner эти правила есть, в agroPartners не было —
   подпись наезжала на чекбокс (подвал, синяя форма «Подобрать оборудование»). */
.mw-inp {
    margin-top: 10px;
}
.mw-inp .quik-form-wrap__agree2 {
    margin-left: 26px;
}
@media (max-width: 1199px) {
    .mw-inp {
        margin-top: 15px;
        margin-left: 20px;
        justify-content: center !important;
    }
}
/* согласие в синей форме: белый текст и подчёркнутые ссылки, как в agroInner */
.blueIncAgree .quik-form-wrap__agree2,
.blueIncAgree .quik-form-wrap__agree2 a {
    color: #fff;
}
.blueIncAgree .quik-form-wrap__agree2 a {
    text-decoration: underline;
}

/* окно заявки на планшетах: картинка скрыта — не растягиваем окно на всю ширину */
@media (max-width: 1199px) and (min-width: 576px) {
    .popup-section .popup-section__form-container {
        max-width: 520px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* ссылки в подписях согласия заметны во всех формах */
.quik-form-wrap__agree2 a,
.quik-form-wrap__agree a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Единый вид чекбоксов согласия: синий квадрат, белая галочка (как #checkbox2 в шаблонах).
   Раньше в подвалах и встроенных формах стояли стандартные браузерные чекбоксы. */
.ch-inp input[type="checkbox"],
#checkbox_0s {
    display: none;
}
.ch-inp input[type="checkbox"] + label,
#checkbox_0s + label {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border: 1px solid var(--second-color, #303194);
    background-color: var(--second-color, #303194);
    cursor: pointer;
    vertical-align: top;
}
.ch-inp input[type="checkbox"]:checked + label:before,
#checkbox_0s:checked + label:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background: url(/bitrix/templates/agroInner/css/images/checkbox.svg) no-repeat center / 10px 10px;
}
/* в синей форме квадрат с белой рамкой, иначе сливается с фоном */
.blueIncAgree .ch-inp input[type="checkbox"] + label {
    border-color: #fff;
}
.agromig-popup-consent .ch-inp input[type="checkbox"] + label,
.agromig-foot-consent .ch-inp input[type="checkbox"] + label {
    position: absolute;
    top: 2px;
    margin-top: 0;
}
/* окно заявки на телефонах: меньше пустого места под кнопкой */
@media (max-width: 575px) {
    .popup-section .popup-section__form-container {
        padding-bottom: 12px;
    }
    .popup-section .agromig-popup-consent + button.popup-section__stroke-button {
        margin-top: 18px;
    }
}
/* кнопка «Оставить заявку» в блоках главной (открывает окно заявки) */
.agromig-block-btn {
    display: inline-flex;
    align-self: flex-start;
    width: auto;
    align-items: center;
    justify-content: center;
    margin-top: 28px;
    min-width: 240px;
    height: 54px;
    padding: 0 32px;
    background: var(--second-color, #303194);
    border: 1px solid var(--second-color, #303194);
    color: #fff !important;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .3s, color .3s, border-color .3s;
}
.agromig-block-btn:hover {
    background: #fff;
    border-color: #fff;
    color: var(--second-color, #303194) !important;
}
@media (max-width: 575px) {
    .agromig-block-btn {
        align-self: stretch;
        width: 100%;
    }
}

/* реквизиты в подвале */
.foot-requisites {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #6c7177;
}
@media (max-width: 1199px) {
    .foot-requisites {
        text-align: center;
        padding: 0 16px;
    }
}

/* Определение под H1 листинга */
.agromig-lead {
    max-width: 860px;
    margin: 14px 0 0;
    font-size: 16px;
    line-height: 1.5;
    color: #111;
}
/* «Оплата и финансирование» */
.agromig-finance {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.agromig-finance-item {
    border: 1px solid #e3e6f3;
    border-top: 3px solid var(--second-color, #303194);
    padding: 22px 20px;
    background: #fff;
}
.agromig-finance-item h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--second-color, #303194);
    text-transform: uppercase;
}
.agromig-finance-item p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #111;
}
.agromig-finance-item a {
    color: var(--second-color, #303194);
    text-decoration: underline;
}
/* «Вопросы и ответы» */
.agromig-faq {
    max-width: 960px;
    border-top: 1px solid #dfe2ee;
}
.agromig-faq-item {
    border-bottom: 1px solid #dfe2ee;
}
.agromig-faq-item summary {
    position: relative;
    padding: 18px 44px 18px 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: #111;
    cursor: pointer;
    list-style: none;
}
.agromig-faq-item summary::-webkit-details-marker {
    display: none;
}
.agromig-faq-item summary::after {
    content: '+';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    font-weight: 400;
    color: var(--second-color, #303194);
}
.agromig-faq-item[open] summary::after {
    content: '−';
}
.agromig-faq-answer p {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.55;
    color: #333;
}
@media (max-width: 1199px) {
    .agromig-finance {
        grid-template-columns: repeat(2, 1fr);
    }
    .agromig-finance-section .container-fluid,
    .agromig-faq-section .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
}
@media (max-width: 575px) {
    .agromig-finance {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .agromig-faq-item summary {
        font-size: 16px;
    }
    .agromig-lead {
        font-size: 15px;
        padding: 0 15px;
    }
}

/* Кнопки под 3D на карточках МИГ: КП во всю ширину, мессенджеры под ней.
   Колонка сжимается до ширины 3D (у неё фиксированная ширина на каждом брейкпоинте),
   поэтому кнопки всегда ровно под моделью. */
[class*="col-"]:has(> .d-wrap-sprite + .agromig-card-actions) {
    display: grid;
    grid-template-columns: min-content;
    align-content: start;
}
.agromig-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}
.agromig-card-btn--kp {
    flex: 1 1 100%;
}
.agromig-card-btn--msg {
    flex: 1 1 200px;
}
.agromig-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid var(--second-color, #303194);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .03em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .3s, color .3s;
}
.agromig-card-btn img {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    flex: 0 0 22px;
}
.agromig-card-btn--kp {
    background: var(--second-color, #303194);
    color: #fff !important;
}
.agromig-card-btn--kp:hover {
    background: #fff;
    color: var(--second-color, #303194) !important;
}
.agromig-card-btn--msg {
    background: #fff;
    color: var(--second-color, #303194) !important;
}
.agromig-card-btn--msg:hover {
    background: #eef0fb;
}
/* определение под H1 листинга — отступ до каталога */
.agromig-lead {
    margin-bottom: 40px;
}
@media (max-width: 575px) {
    .agromig-lead {
        margin-bottom: 24px;
    }
}

/* Партнёрские страницы на телефоне: после удаления WhatsApp закреплённая кнопка одна — во всю ширину */
@media (max-width: 900px) {
    .fixed-btns-wrap {
        left: 0;
        right: 0;
        width: auto;
        margin-left: 0;
        padding: 0 16px;
        box-sizing: border-box;
    }
    .fixed-btns-wrap .main-row-partners-btn.mrp-b-footer {
        flex: 1 1 auto;
        max-width: 420px;
        margin: 0;
    }
}

/* Карточки МИГ: на десктопе кнопки дальше от 3D; синяя форма выше (21.10.2026) */
@media (min-width: 1200px) {
    .agromig-card-actions {
        margin-top: 40px;
    }
    .inner-blue-form {
        height: 380px;
    }
}

/* Мобильное меню: MAX рядом с Telegram */
.socials-icons-wrap .socials-icons a + a {
    margin-left: 10px;
}

/* Первый экран главной: галочка белая, а фон квадрата принудительно белый — отмеченное согласие не было видно */
.form10 #checkbox:checked + label,
.form10 #checkbox2:checked + label {
    background-color: var(--second-color, #303194) !important;
}
