/* 2026-10-02 ДЕМО: блок выбора аренды (catalog.element/main_rentcfg). Темы — через переключатели Aspro --light/--dark */
.igr-rc {
    --rc-bg:      var(--light, #ffffff) var(--dark, #232323);
    --rc-bd:      var(--light, #e6e8ec) var(--dark, #333333);
    --rc-tile:    var(--light, #f6f7f9) var(--dark, #2a2a2a);
    --rc-tile-hv: var(--light, #eef1f5) var(--dark, #303030);
    --rc-text:    var(--light, #1f2328) var(--dark, #f1f1f1);
    --rc-muted:   var(--light, #7b818a) var(--dark, #9a9a9a);
    --rc-acc:     var(--theme-base-color, #0065bb);
    --rc-acc-bg:  var(--light, rgba(0, 101, 187, .07)) var(--dark, rgba(64, 150, 255, .13));
    --rc-ok:      var(--light, #15803d) var(--dark, #4ade80);
    --rc-busy:    var(--light, #c2410c) var(--dark, #fb923c);
    --rc-busy-bg: var(--light, #fff4ec) var(--dark, rgba(251, 146, 60, .12));
    margin: 18px 0 8px;
    padding: 16px;
    background: var(--rc-bg);
    border: 1px solid var(--rc-bd);
    border-radius: 16px;
    color: var(--rc-text);
}
.igr-rc button { font: inherit; color: inherit; cursor: pointer; }
.igr-rc__step { margin-bottom: 14px; }
.igr-rc__step[hidden] { display: none; }
.igr-rc__label {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
    font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--rc-muted);
}
.igr-rc__num {
    display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
    border-radius: 50%; background: var(--rc-acc); color: #fff; font-size: 11px; letter-spacing: 0;
}
.igr-rc__help-toggle {
    margin-left: auto; padding: 0; border: 0; background: none;
    font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--rc-acc) !important;
    text-decoration: underline dotted; text-underline-offset: 3px;
}
.igr-rc__help { margin: 0 0 10px; padding: 4px 12px; border-radius: 12px; background: var(--rc-tile); font-size: 12px; line-height: 16px; }
.igr-rc__help[hidden] { display: none; }
.igr-rc__help-row { padding: 9px 0; }
.igr-rc__help-row + .igr-rc__help-row { border-top: 1px solid var(--rc-bd); }
.igr-rc__help-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.igr-rc__help-head a { font-size: 12px; color: var(--rc-acc); white-space: nowrap; }
.igr-rc__help-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.igr-rc__help-tags span { padding: 2px 8px; border-radius: 999px; background: var(--rc-bg); border: 1px solid var(--rc-bd); color: var(--rc-text); white-space: nowrap; }
.igr-rc__note { margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--rc-muted); }

.igr-rc__seg { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--rc-tile); }
.igr-rc__segbtn {
    flex: 1 1 0; padding: 8px 10px; border: 0; border-radius: 9px; background: none;
    font-size: 14px; font-weight: 600; color: var(--rc-muted) !important; transition: background-color .15s, color .15s;
}
.igr-rc__segbtn.is-active { background: var(--rc-bg); color: var(--rc-text) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.igr-rc__opts { display: flex; flex-direction: column; gap: 6px; }
.igr-rc__opt {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left;
    background: var(--rc-tile); border: 1.5px solid transparent; border-radius: 12px; transition: background-color .15s, border-color .15s;
}
.igr-rc__opt[hidden] { display: none; }
.igr-rc__opt:hover { background: var(--rc-tile-hv); }
.igr-rc__opt.is-active { border-color: var(--rc-acc); background: var(--rc-acc-bg); }
.igr-rc__opt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.igr-rc__opt-title { font-size: 14px; line-height: 19px; font-weight: 700; }
.igr-rc__opt-sub { font-size: 12px; line-height: 16px; color: var(--rc-muted); }
.igr-rc__opt-side { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.igr-rc__opt-price { font-size: 14px; font-weight: 700; white-space: nowrap; }
.igr-rc__opt-unit { font-size: 11px; color: var(--rc-muted); white-space: nowrap; }
.igr-rc__opt.is-busy .igr-rc__opt-price { color: var(--rc-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.igr-rc__opt.is-busy .igr-rc__opt-unit { color: var(--rc-busy); font-weight: 600; }

.igr-rc__weeks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.igr-rc__week {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px;
    background: var(--rc-tile); border: 1.5px solid transparent; border-radius: 12px; transition: background-color .15s, border-color .15s;
}
.igr-rc__week:hover { background: var(--rc-tile-hv); }
.igr-rc__week.is-active { border-color: var(--rc-acc); background: var(--rc-acc-bg); }
.igr-rc__week-n { font-size: 12px; line-height: 16px; color: var(--rc-muted); white-space: nowrap; }
.igr-rc__week.is-active .igr-rc__week-n { color: var(--rc-text); }
.igr-rc__week-p { font-size: 13px; line-height: 17px; font-weight: 700; white-space: nowrap; }

.igr-rc__status { display: flex; align-items: center; gap: 7px; margin: 2px 0 8px; font-size: 13px; font-weight: 600; }
.igr-rc__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.igr-rc__status.is-free { color: var(--rc-ok); }
.igr-rc__status.is-busy { color: var(--rc-busy); }
.igr-rc__alt {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 8px 10px;
    border-radius: 10px; background: var(--rc-busy-bg); font-size: 13px;
}
.igr-rc__alt[hidden] { display: none; }
.igr-rc__alt-btn {
    margin-left: auto; padding: 4px 10px; border: 1px solid var(--rc-acc); border-radius: 8px; background: none;
    font-size: 12px; font-weight: 600; color: var(--rc-acc) !important;
}
.igr-rc__sum { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--rc-bd); }
.igr-rc__sum-what { font-size: 13px; color: var(--rc-muted); }
.igr-rc__sum-price { font-size: 26px; line-height: 32px; font-weight: 800; white-space: nowrap; }
.igr-rc__actions { margin-top: 12px; }
.igr-rc__actions .btn { display: flex !important; align-items: center; justify-content: center; width: 100%; min-height: 48px; border-radius: 12px !important; font-weight: 700; }
.igr-rc__actions .btn[style*="display:none"], .igr-rc__actions .btn[style*="display: none"] { display: none !important; }
.igr-rc__actions .btn i, .igr-rc__actions .btn svg { display: none; }

/* «Купить навсегда» — вторичная карточка под основной кнопкой */
.igr-rc__forever {
    --rc-fv-bg: var(--light, #f4f7ff) var(--dark, rgba(64, 150, 255, .08));
    --rc-fv-bd: var(--light, #d9e4ff) var(--dark, rgba(64, 150, 255, .25));
    margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--rc-fv-bg); border: 1px solid var(--rc-fv-bd);
}
.igr-rc__forever-head { display: flex; align-items: center; gap: 8px; color: var(--rc-acc); }
.igr-rc__forever-ico { flex: none; }
.igr-rc__forever-title { font-size: 14px; font-weight: 700; color: var(--rc-text); }
.igr-rc__forever-text { margin-top: 4px; font-size: 12.5px; line-height: 17px; color: var(--rc-muted); }
.igr-rc__forever-price { margin-top: 6px; font-size: 13px; color: var(--rc-muted); }
.igr-rc__forever-price b { font-size: 15px; color: var(--rc-text); }
.igr-rc__forever-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; min-height: 40px;
    border: 1.5px solid var(--rc-acc); border-radius: 10px; font-size: 14px; font-weight: 700;
    color: var(--rc-acc) !important; text-decoration: none !important; transition: background-color .15s, color .15s;
}
.igr-rc__forever-btn:hover { background: var(--rc-acc); color: #fff !important; }

/* липкая панель (только мобилка, появляется, когда блок ушёл вверх за экран) */
.igr-rc-bar {
    --rc-bar-bg: var(--light, rgba(255, 255, 255, .96)) var(--dark, rgba(30, 30, 30, .96));
    --rc-bar-bd: var(--light, #e6e8ec) var(--dark, #333);
    --rc-bar-tx: var(--light, #1f2328) var(--dark, #f1f1f1);
    --rc-bar-mu: var(--light, #7b818a) var(--dark, #9a9a9a);
    display: none;
}
@media (max-width: 991px) {
    .igr-rc-bar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000;
        display: flex; align-items: center; gap: 12px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: var(--rc-bar-bg); border-top: 1px solid var(--rc-bar-bd);
        backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        transform: translateY(110%); transition: transform .2s ease;
    }
    .igr-rc-bar.is-shown { transform: none; }
    .igr-rc-bar__info { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
    .igr-rc-bar__what { font-size: 12px; color: var(--rc-bar-mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .igr-rc-bar__price { font-size: 18px; font-weight: 800; color: var(--rc-bar-tx); }
    .igr-rc-bar__btn {
        flex: none; padding: 12px 18px; border: 0; border-radius: 12px;
        background: var(--theme-base-color, #0065bb); color: #fff; font-size: 15px; font-weight: 700;
    }
}
@media (max-width: 767px) {
    .igr-rc { padding: 14px; border-radius: 14px; }
    .igr-rc__weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Aspro ограничивает adaptive-block (мобилка/планшет) шириной 280px — для блока выбора расширяем */
.product-container .info_item .adaptive-block:has(.igr-rc) { max-width: 560px; }
.igr-rc__actions .btn { text-transform: none !important; letter-spacing: 0 !important; font-size: 15px !important; }
/* A/B: в варианте B список «Цены» под галереей скрыт — сравниваем блок выбора против списка (в A список как был).
   Только CSS: в HTML блок остаётся (микроразметки в нём нет), этот файл грузится лишь когда блок выбора отрисован. */
.ordered-block.js-offers-scroll.offers { display: none !important; }

/* 2026-10-03: планшет 768–991 — галерея и блок выбора стоят в одну колонку (как на мобилке).
   Иначе Aspro ставит их inline-block рядом, высокий блок тянет галерею вниз и всё слипается. */
@media (min-width: 768px) and (max-width: 991px) {
    .product-info:has(.igr-rc) .product-detail-gallery,
    .product-info:has(.igr-rc) .right_info { display: block !important; width: 100% !important; }
    .product-info:has(.igr-rc) .right_info { margin-top: 24px; }
    .product-info:has(.igr-rc) .adaptive-block:has(.igr-rc) { max-width: none !important; }
    .product-info:has(.igr-rc) .product-detail-gallery__container { max-width: 640px; margin: 0 auto; }
}
/* подложка .igr-has-bg всегда тёмная — цена «от … /Неделя» в светлой теме должна быть белой */
.product-info.igr-has-bg .right_info .price_matrix_wrapper,
.product-info.igr-has-bg .right_info .price_matrix_wrapper * { color: #fff !important; }

/* 2026-10-03 скидка за срок: метка на кнопке недели и зачёркнутая полная сумма */
.igr-rc__week { position: relative; }
.igr-rc__week-d { position: absolute; top: -8px; right: -4px; padding: 1px 6px; border-radius: 8px; background: #2e9c3f; color: #fff; font-size: 10px; line-height: 14px; font-weight: 700; }
.igr-rc__sum-old { font-size: 15px; font-weight: 600; color: var(--rc-muted); margin-right: 4px; }
.igr-rc__auto { display: flex; gap: 8px; margin-top: 12px; }
.igr-rc__auto-stat { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--rc-tile); border: 1px solid var(--rc-bd); }
.igr-rc__auto-stat b { font-size: 15px; line-height: 19px; color: var(--rc-text); }
.igr-rc__auto-stat span { font-size: 11px; line-height: 14px; color: var(--rc-muted); }
