/*
    Модальные окна покупки (Remodal)
 */
.display-none { display: none !important; }

.remodal-overlay { background: rgba(4, 7, 13, .78); }
.remodal-wrapper { padding: 24px; }

.remodal.payment-modal { width: 100%; max-width: 670px; position: relative; overflow: visible; margin: 0 0 24px; padding: 40px; border: 1px solid #394151; border-radius: 42px; color: #fff; background: #121620 url("img/bg_modals.png") right bottom / cover no-repeat; box-shadow: 0 28px 70px rgba(0, 0, 0, .48); font-family: "Montserrat", Arial, sans-serif; font-size: 14px; line-height: 1.45; text-align: left; }
.remodal.payment-modal--receipt { margin-bottom: 94px; }
.payment-modal::before { position: absolute; z-index: 0; inset: 0; border-radius: inherit; content: ""; background: linear-gradient(90deg, rgba(18, 22, 32, .98) 0%, rgba(18, 22, 32, .94) 43%, rgba(18, 22, 32, .64) 100%); }
.payment-modal > * { position: relative; z-index: 1; }
.payment-modal__close { width: 30px; height: 30px; position: absolute; z-index: 2; top: 30px; right: 30px; overflow: hidden; padding: 0; border: 0; border-radius: 7px; color: transparent; background: var(--pink) url("img/close.svg") center / 14px 14px no-repeat; font-size: 0; line-height: 0; cursor: pointer; transition: background-color .2s, transform .2s; }
.payment-modal__close:hover { background-color: var(--pink-dark); transform: scale(1.05); }

/* Заголовки окна: покупка товара / оплата корзины */
.remodal-header-fly-cart { display: none; }
.remodal[data-modal-buy-method="product"] .remodal-header-fly-goods { display: block; }
.remodal[data-modal-buy-method="cart"] .remodal-header-fly-goods { display: none; }
.remodal[data-modal-buy-method="cart"] .remodal-header-fly-cart { display: block; }
.remodal[data-modal-buy-method="cart"] .payment-form__grid { grid-template-columns: minmax(0, 1fr); }

.payment-form { margin: 0; }
.payment-form__title { margin: 0 0 18px; font-size: 24px; font-weight: 600; line-height: 1.15; }
.payment-form__product { max-width: 100%; margin: 0 0 30px; color: #fff; font-size: 14px; font-weight: 500; line-height: 1.35; }
.payment-form__product:empty { display: none; }
.payment-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 40px; max-width: 100%; }
.payment-form__field { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; color: rgb(255 255 255 / 0.30); font-size: 12px; font-weight: 400; }
.payment-form__grid .payment-form__field { margin-top: 0; }
.payment-form__field input { width: 100%; min-height: 53px; padding: 14px 20px; border: 0; border-radius: 11px; outline: 0; color: #fff; background: rgba(255, 255, 255, .08); font-family: inherit; font-size: 14px; font-weight: 400; }
.payment-form__field input::placeholder { color: rgba(255, 255, 255, .3); }
.payment-form__field input:focus-visible { box-shadow: 0 0 0 2px rgba(239, 0, 82, .7); }
.payment-form__field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.payment-form__field input[type="number"]::-webkit-inner-spin-button,
.payment-form__field input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.payment-form__field--wide { max-width: 100%; }
.payment-form__text { margin: 0; color: #fff; font-size: 14px; font-weight: 500; line-height: 1.35; }

/* Платежные системы — нативные radio-кнопки */
.payment-methods { display: flex; flex-wrap: wrap; gap: 16px; }
.payment-method { width: 100px; position: relative; display: grid; gap: 7px; color: #838793; font-size: 12px; font-weight: 400; text-align: center; cursor: pointer; }
.payment-method input { position: absolute; opacity: 0; pointer-events: none; }
.payment-method > span { height: 89px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 11px; background: #292d39; transition: border-color .2s, background-color .2s; }
.payment-method img { max-width: 60px; max-height: 60px; object-fit: contain; }
.payment-method b { font: inherit; }
.payment-method:hover > span { background: #323744; }
.payment-method input:checked + span { border-color: #fff; }
.payment-method input:checked + span + b {color: #fff;}
.payment-method input:focus-visible + span { box-shadow: 0 0 0 2px var(--pink); }

.payment-form__agree { display: flex; align-items: center; gap: 10px; margin-top: 30px; color: #fff; font-size: 12px; font-weight: 400; cursor: pointer; }
.payment-form__agree input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: #fff; }
.payment-form__agree a { color: var(--pink); text-decoration: underline; }

.payment-form__bottom { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 30px; }
.payment-form__bottom--single { justify-content: center; margin-top: 30px; }
.payment-form__bottom--receipt { justify-content: flex-end; }
.payment-receipt { width: 211px; height: 107px; position: absolute; left: 21px; bottom: -70px; display: flex; flex-direction: column; align-items: flex-end; padding: 16px 14px 12px; color: #171923; background: url("img/sales-printed-blank-receipt-png-1.png") center / 100% 100% no-repeat; font-style: normal; text-align: right; }
.payment-receipt::before { width: calc(100% + 14px); height: 10px; position: absolute; top: -7px; left: -7px; border-radius: 4px; content: ""; background: #454957; box-shadow: 0 2px 4px rgba(0, 0, 0, .28); }
.payment-receipt::after { width: calc(100% - 28px); position: absolute; right: 14px; bottom: 32px; border-top: 1px dashed #92949a; content: ""; }
.payment-receipt span { position: relative; z-index: 1; color: #7e818b; font-size: 12px; font-weight: 400; }
.payment-receipt strong { position: relative; z-index: 1; margin-top: 2px; color: #161820; font-size: 20px; font-weight: 600; line-height: 1.1; }
.payment-receipt strong span { color: inherit; font-size: inherit; font-weight: inherit; }
.payment-receipt b {width: 100%; text-align: center; position: relative; z-index: 1; margin-top: auto; color: #c1c8d7; font-size: 10px; font-weight: 500; }
.payment-action { display: inline-flex; align-items: center; justify-content: center; gap: 20px; padding: 15px; border: 0; border-radius: 12px; color: #fff; background: var(--pink); font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color .2s, transform .2s, opacity .2s; }
.payment-action:hover { background: var(--pink-dark); transform: translateY(-2px); }
.payment-action:disabled { cursor: default; opacity: .5; transform: none; }
.payment-action img { width: 19px; height: 10px; }

.payment-form__title-line { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; }
.payment-form__title-line .payment-form__title { margin-bottom: 0; }
.payment-form__notice { padding: 5px 8px; border: 0; border-radius: 7px; color: #fff; background: #c15e37; font-family: inherit; font-size: 12px; font-weight: 400; line-height: 1.45; cursor: pointer; transition: background-color .2s; }
.payment-form__notice:hover { background: #d36a41; }
.payment-props { display: flex; gap: 12px; }
.payment-props span { min-width: 118px; display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 10px; color: #7f8390; background: #292d39; font-size: 12px; font-weight: 400; }
.payment-props b { color: #fff; font-size: 13px; font-weight: 400; }


/*
    Корзина платформы (надстройка над .b-overlay / .b-popup)
 */
#body .b-overlay { padding: 24px 24px 110px; overflow: hidden; overflow-y: auto; z-index: 7777 !important; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; background: rgba(4, 7, 13, .78); }
#body .b-overlay .b-popup { width: 100%; max-width: 670px; min-height: auto; position: relative; left: auto; right: auto; top: auto; bottom: auto; margin: 0 !important; padding: 40px; overflow: visible; border: 1px solid #394151; border-radius: 42px; color: #fff; background: #121620 url("img/bg_modals.png") right bottom / cover no-repeat; box-shadow: 0 28px 70px rgba(0, 0, 0, .48); transform: none !important; font-family: "Montserrat", Arial, sans-serif; font-size: 14px; line-height: 1.45; text-align: left; }
#body .b-overlay .b-popup > * { position: relative; z-index: 1; }
#body .b-overlay .b-popup > .b-popup__head { position: static; margin: 0; }
#body .b-popup__title { display: none; }
#body .b-popup__body { padding: 0; background: 0; border-radius: 0; }
#body .b-popup__edit { width: 30px; height: 30px; position: absolute; z-index: 2; top: 30px; right: 30px; display: block; overflow: hidden; margin: 0; padding: 0; border: 0; border-radius: 7px; color: transparent; background: var(--pink) url("img/close.svg") center / 14px 14px no-repeat; font-size: 0; line-height: 0; text-decoration: none; cursor: pointer; transition: background-color .2s, transform .2s; }
#body .b-popup__edit:hover { color: transparent; background-color: var(--pink-dark); transform: scale(1.05); }
#body .b-popup .info-b-basket { height: auto; margin: 20px 0 0; padding: 10px 14px; border-radius: 10px; color: #fff; background: #292d39; box-shadow: none; font-size: 12px; text-transform: none; }

.modifications-cart .b-basket,
.modifications-cart .b-basket-total,
.modifications-cart .b-btn.itemcartpay { display: none !important; }

.cart-prev-outer { display: flex; flex-direction: column; }
.cart-modal__title { margin: 0 0 18px; padding-right: 50px; font-size: 24px; font-weight: 600; line-height: 1.15; }

.cart-list { max-height: 390px; display: grid; gap: 14px; padding-right: 14px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--pink) #292d39; }
.cart-list::-webkit-scrollbar { width: 8px; }
.cart-list::-webkit-scrollbar-track { border-radius: 10px; background: #292d39; }
.cart-list::-webkit-scrollbar-thumb { border-radius: 10px; background: var(--pink); }
.cart-list__item { min-height: 99px; position: relative; padding: 17px 48px 15px 20px; border-radius: 12px; background: rgb(255 255 255 / 0.08); }
.cart-list__item p {word-break: break-all; margin: 0 0 17px; color: #fff; font-size: 14px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.cart-list__quantity { display: inline-flex; align-items: center; gap: 5px; margin-right: 42px; padding: 5px 8px; border: 1px solid #4a4e5c; border-radius: 6px; color: #c9cbd2; background: #20242f; font-size: 14px; font-weight: 400; }
.cart-list__quantity input { width: 42px; padding: 0; border: 0; outline: 0; color: #fff; background: transparent; font-family: inherit; font-size: inherit; font-weight: inherit; }
.cart-list__quantity:focus-within { border-color: var(--pink); box-shadow: 0 0 0 2px rgba(234, 9, 80, .22); }
.cart-list__quantity input:focus-visible { color: #fff; }
.cart-list__item b { margin-right: 42px; color: #828693; font-size: 14px; font-weight: 400; }
.cart-list__remove { width: 20px; height: 20px; position: absolute; top: 12px; right: 12px; padding: 0 0 2px; border: 0; border-radius: 5px; color: #fff; background: var(--pink); font-family: inherit; font-size: 19px; line-height: 1; cursor: pointer; transition: background-color .2s; }
.cart-list__remove:hover { background: var(--pink-dark); }
.cart-list__empty { margin: 40px 0; color: #a7aab3; text-align: center; }
.cart-list .cart-list__empty { margin: 26px 0; }

/* Плавающая кнопка корзины платформы */
#body a.cartlequebutton { width: 46px; height: 46px; position: fixed; z-index: 30; left: auto; right: 30px; top: 40%; bottom: auto; display: grid; place-items: center; padding: 0; border-radius: 50%; color: #fff; background: #131620; box-shadow: 0 8px 20px rgba(9, 12, 22, .24); transition: background-color .2s, transform .2s; }
#body a.cartlequebutton:hover { background: #242936; transform: translateY(-2px); }
#body a.cartlequebutton:focus-visible { outline: 2px solid #ea0950; outline-offset: 3px; }
#body a.cartlequebutton::after { width: 18px; height: 18px; content: ""; background: url("img/cart.svg") center / contain no-repeat; }
#body a.cartlequebutton > span.counter_cartlequebutton { width: auto; min-width: 18px; height: 18px; position: absolute; top: -6px; right: -6px; left: auto; bottom: auto; display: grid; place-items: center; padding: 0 4px; border-radius: 9px; color: #fff; background: #ea0950; box-shadow: none; font-size: 12px; font-weight: 600; line-height: 1; transform: none; }
#body a.cartlequebutton > span.counter_cartlequebutton:empty { display: none; }


@media (max-width: 680px) {
  .remodal-wrapper { padding: 16px; }
  .remodal.payment-modal, #body .b-overlay .b-popup { padding: 45px 30px 30px; border-radius: 28px; }
  #body .b-overlay { padding: 16px 16px 100px; }
  .payment-modal__close, #body .b-popup__edit { top: 18px; right: 18px; }
  .payment-form__product { margin-bottom: 25px; }
  .payment-form__grid { gap: 20px; }
  .payment-form__bottom { align-items: center; }
}

@media (max-width: 440px) {
  .remodal-wrapper { padding: 10px; }
  .remodal.payment-modal, #body .b-overlay .b-popup { padding: 52px 20px 24px; border-radius: 22px; background-size: auto 76%; background-position: right bottom; }
  .remodal.payment-modal--receipt { margin-bottom: 10px; }
  #body .b-overlay { padding: 10px; }
  .payment-modal__close, #body .b-popup__edit { width: 30px; height: 30px; top: 13px; right: 13px; }
  .payment-form__title, .cart-modal__title { font-size: 22px; }
  .payment-form__product { font-size: 13px; }
  .payment-form__grid { grid-template-columns: 1fr; gap: 18px; }
  .payment-form__field { margin-top: 20px; }
  .payment-form__bottom { align-items: stretch; flex-direction: column; margin-top: 22px; }
  .payment-form__bottom--single { align-items: center; }
  .payment-receipt { position: relative; left: auto; bottom: auto; margin: 0 auto; }
  .payment-action { width: 100%; gap: 30px; }
  .payment-form__title-line { align-items: flex-start; flex-direction: column; gap: 10px; }
  .payment-props { width: 100%; }
  .payment-props span { min-width: 0; flex: 1; padding: 8px; }
  .cart-list { max-height: 300px; }
  .cart-list__item p { font-size: 12px; }
  .cart-list__quantity, .cart-list__item b { margin-right: 16px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .payment-modal__close, .payment-action, #body .b-popup__edit, #body a.cartlequebutton { transition: none; }
  .payment-modal__close:hover, .payment-action:hover, #body .b-popup__edit:hover, #body a.cartlequebutton:hover { transform: none; }
}
