/* RS-CAM: форма «Запросить счёт» (корзина + карточка). ТЗ cart-request-brief-2026-10-22.
   Только px: на сайте root font-size = 10px, rem считаются неверно. */

/* Корзина: старое оформление заказа больше не используется */
.bx-basket .basket-btn-checkout,
.bx-basket .basket-checkout-section .btn-checkout { display: none !important; }

.rs-cl-box {
    box-sizing: border-box;
    background: #fff8e6;
    border: 1px solid #f0d98a;
    border-radius: 10px;
    padding: 20px 22px;
    margin: 0 0 24px;
    color: #1a1a1a;
    font-size: 15px;
    line-height: 1.5;
}
.rs-cl-box *, .rs-cl-box *::before, .rs-cl-box *::after { box-sizing: border-box; }
.rs-cl-title { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 0 0 6px; color: #1a1a1a; }
.rs-cl-sub { margin: 0 0 14px; color: #333; font-size: 15px; }
.rs-cl-item { margin: -6px 0 14px; color: #555; font-size: 14px; }
.rs-cl-fields { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0 0 12px; }
.rs-cl-field label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 4px; color: #1a1a1a; }
.rs-cl-opt { font-weight: 400; color: #777; }
.rs-cl-field input {
    display: block; width: 100%; height: 48px; padding: 10px 14px;
    font-size: 16px; /* 16px — iOS не увеличивает страницу при фокусе */
    color: #1a1a1a; background: #fff; border: 1px solid #c9c9c9; border-radius: 6px;
    -webkit-appearance: none; appearance: none; box-shadow: none;
}
.rs-cl-field input:focus { outline: none; border-color: #c9971a; box-shadow: 0 0 0 3px rgba(246, 190, 38, 0.35); }
.rs-cl-field input[aria-invalid="true"] { border-color: #c62828; }
.rs-cl-err { color: #c62828; font-size: 14px; line-height: 1.4; margin: 4px 0 0; min-height: 0; }
.rs-cl-err:empty { display: none; }
.rs-cl-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: #444; font-weight: 400; margin: 0; cursor: pointer; }
.rs-cl-consent input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #1a1a1a; }
.rs-cl-consent a { color: #1a1a1a; text-decoration: underline; }
.rs-cl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.rs-cl-btn {
    display: block; width: 100%; min-height: 52px; margin: 14px 0 0; padding: 12px 24px;
    font-size: 17px; font-weight: 700; line-height: 1.2; color: #1a1a1a;
    background: #F6BE26; border: 0; border-radius: 8px; cursor: pointer;
}
.rs-cl-btn:hover { background: #e9b11c; }
.rs-cl-btn:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }
.rs-cl-btn[disabled] { opacity: 0.7; cursor: default; }
.rs-cl-status { margin: 10px 0 0; font-size: 15px; }
.rs-cl-status:empty { display: none; }
.rs-cl-status--err { color: #c62828; font-weight: 600; }
.rs-cl-status a, .rs-cl-ok a { color: #1a1a1a; font-weight: 700; white-space: nowrap; }
.rs-cl-ok:focus { outline: none; }

@media (min-width: 768px) {
    .rs-cl-box--basket { padding: 24px 28px; }
    .rs-cl-box--basket .rs-cl-fields { grid-template-columns: 1fr 1fr; }
    .rs-cl-box--basket .rs-cl-btn { width: auto; display: inline-block; min-width: 260px; }
}

/* Карточка товара: кнопка рядом с «Заказать» */
.rs-cl-card-btn {
    display: table; clear: both; margin: 10px 0 0; padding: 12px 22px;
    font-size: 15px; font-weight: 700; color: #1a1a1a !important;
    background: #fff; border: 2px solid #F6BE26; border-radius: 4px; cursor: pointer;
}
.rs-cl-card-btn:hover { background: #fff8e6; }
@media (max-width: 767px) {
    .rs-cl-card-btn { display: block; width: 100%; min-height: 44px; white-space: normal; box-sizing: border-box; }
}

/* Модальное окно */
html.rs-cl-lock, html.rs-cl-lock body { overflow: hidden; }
.rs-cl-modal {
    position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(0, 0, 0, 0.55);
}
.rs-cl-modal__box {
    position: relative; width: 100%; max-width: 480px; max-height: 100%; overflow-y: auto;
    background: #fff; border-radius: 12px;
}
.rs-cl-modal__box .rs-cl-box { margin: 0; border: 0; background: #fff; padding: 26px 24px 22px; }
.rs-cl-modal__close {
    position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; background: transparent;
    font-size: 30px; line-height: 1; color: #555; cursor: pointer; z-index: 1;
}
.rs-cl-modal__close:hover { color: #1a1a1a; }
.rs-cl-modal .rs-cl-title { padding-right: 32px; }
@media (max-width: 480px) {
    .rs-cl-modal { padding: 10px; align-items: flex-start; }
    .rs-cl-modal__box .rs-cl-box { padding: 22px 16px 18px; }
    .rs-cl-title { font-size: 19px; }
    .rs-cl-sub { font-size: 14px; margin-bottom: 12px; }
}

/* Нижняя мобильная плашка «Позвонить / Рассчитать» перекрывала кнопку формы:
   в корзине у страницы своя главная кнопка, в открытом окне заявки — тоже. */
html.rs-cl-basket .rs-mobile-sticky-cta,
html.rs-cl-lock .rs-mobile-sticky-cta { display: none !important; }

@media (max-width: 767px) {
    .rs-cl-box--basket { padding: 16px 14px; margin-bottom: 16px; }
    .rs-cl-box--basket .rs-cl-title { font-size: 19px; }
    .rs-cl-box--basket .rs-cl-sub { font-size: 14px; margin-bottom: 10px; }
    .rs-cl-fields { gap: 8px; margin-bottom: 10px; }
    .rs-cl-field input { height: 46px; }
    .rs-cl-btn { margin-top: 12px; min-height: 50px; }
}

/* Текст под заголовком: на телефоне в корзине — короткий (дополнение 1, п. 4) */
.rs-cl-sub-short { display: none; }
@media (max-width: 767px) {
    .rs-cl-box--basket .rs-cl-sub-full { display: none; }
    .rs-cl-box--basket .rs-cl-sub-short { display: inline; }
    .bx-basket .rs-cl-row { margin-top: -10px; }
}

/* Купон: на телефоне свёрнут в ссылку (дополнение 1, п. 4), на компьютере — как был */
.rs-cl-coupon-toggle { display: none; }
@media (max-width: 767px) {
    html.rs-cl-basket:not(.rs-cl-coupon-open) .bx-basket .basket-coupon-section { display: none !important; }
    .rs-cl-coupon-toggle {
        display: inline-block; margin: 0 0 10px; padding: 6px 0; border: 0; background: none;
        font-size: 14px; color: #1a1a1a; text-decoration: underline; cursor: pointer;
    }
    html.rs-cl-coupon-open .rs-cl-coupon-toggle { display: none; }
}
@media (max-width: 767px) {
    /* Компактный блок «Итого», чтобы кнопка формы была в первом экране (дополнение 1, п. 4) */
    html.rs-cl-basket .bx-basket .basket-checkout-container { padding-top: 8px; padding-bottom: 8px; margin-bottom: 8px; }
    html.rs-cl-basket .bx-basket .basket-checkout-block-total { padding-top: 4px; }
    .rs-cl-coupon-toggle { margin-bottom: 6px; padding: 4px 0; }
}
