/* Заказ из нескольких товаров (multi-order.js) — в стиле окна оформления */
.status-partial { background: rgba(245, 158, 11, .12); color: #f59e0b !important; }
.history-order-status.status-partial { color: #f59e0b; }
/* «Возврат» (refunded) — окончательный статус, деньги на балансе */
.status-refunded { background: rgba(99, 102, 241, .12); color: #6366f1 !important; }
.history-order-status.status-refunded { color: #6366f1; }

/* ── Шаг оплаты: список позиций ── */
.mo-order {
  background: var(--card2); border: 1px solid var(--border2); border-radius: 14px;
  padding: 4px 4px 2px 12px; margin-bottom: 10px;
}
.mo-order-head {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 8px 6px 0; font-size: 12.5px; font-weight: 800; color: var(--text2);
}
.mo-order-head i { color: var(--accent); margin-right: 4px; }
.mo-order-row {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 3px 0;
  border-top: 1px solid var(--border2);
}
.mo-order-row > img { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; object-fit: contain; padding: 3px; background: var(--card3); }
.mo-order-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-order-price { font-weight: 800; font-size: 14px; color: var(--text); white-space: nowrap; padding-right: 6px; }
.mo-order-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  border-top: 1px solid var(--border2); padding: 9px 8px 8px 0; font-size: 13px; font-weight: 700; color: var(--text2);
}
.mo-order-total strong { font-size: 16px; font-weight: 800; color: var(--text); white-space: nowrap; }
.mo-order-total s { color: var(--text3); font-weight: 600; font-size: 13px; margin-right: 4px; }
.mo-order-name img, .mo-row-name img { width: auto !important; height: 1.05em !important; vertical-align: -0.12em; padding: 0 !important; background: none !important; border-radius: 0 !important; }
.mo-old { color: var(--text-muted); font-size: 12px; margin-right: 2px; }
.mo-new-price { color: #22c55e; font-weight: 700; }
.mo-checkout { margin: 0 0 16px; }
.mo-checkout .mo-order { margin-bottom: 0; }

/* ── Шаг 1: добавленные товары — карточки как у основного товара ── */
.mo-s1 { margin: 0 0 14px; }
.mo-s1[hidden] { display: none; }
#step1 > .lf-product-card.mo-stacked { margin-bottom: 8px; }
.mo-card { margin-bottom: 8px !important; }
.mo-cards:empty, .mo-tail:empty { display: none; }
.mo-card-info { flex: 1; min-width: 0; }
.mo-card .lf-product-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-card .lf-product-name img { width: auto !important; height: 1.05em !important; vertical-align: -0.12em; }
.mo-x {
  width: 36px; height: 36px; flex-shrink: 0; margin-right: -6px; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--text3); font-size: 15px; transition: color .15s, background .15s, transform .1s;
}
.mo-x:hover { color: #ef4444; background: rgba(239, 68, 68, .1); }
.mo-x:active { transform: scale(.9); }
.mo-sum {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 4px 4px 12px; font-size: 13px; font-weight: 700; color: var(--text2);
}
.mo-sum strong { font-size: 16px; font-weight: 800; color: var(--text); }

.mo-add {
  width: 100%; height: 46px; border-radius: 14px; border: 1.5px dashed var(--border2);
  background: transparent; color: var(--accent); font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: border-color .2s, background .2s, transform .12s;
}
.mo-add:hover { border-color: var(--accent); background: rgba(16, 185, 129, .06); }
.mo-add:active { transform: scale(.985); }
.mo-add-left { font-size: 12px; font-weight: 700; color: var(--text3); }
.mo-full { font-size: 12.5px; font-weight: 600; color: var(--text3); text-align: center; padding: 6px 0 2px; }
.mo-full i { margin-right: 4px; }

/* ── Окно выбора товара: bottom sheet на телефоне, модальное окно на ПК ── */
/* Пока открыто окно выбора, размытие под окном оформления не нужно (фон
   затемнён), а пересчитывать его на каждом кадре анимации — дорого. */
html.mo-sheet-on .login-flow-overlay { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: rgba(0, 0, 0, .9) !important; }
/* Закрытое окно не убираем из раскладки (display: none) — только прячем,
   чтобы открытие не начиналось с пересчёта всего окна. */
.mo-sheet-root { position: fixed; inset: 0; z-index: 5000; visibility: hidden; pointer-events: none; }
.mo-sheet-root.open { visibility: visible; pointer-events: auto; }
.mo-sheet-bg {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .55);
  opacity: 0; transition: opacity .26s ease;
}
.mo-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 84vh; max-height: 84dvh;
  display: flex; flex-direction: column;
  background: var(--card); color: var(--text); border-radius: 22px 22px 0 0;
  padding: 0 12px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .22);
  transform: translate3d(0, 100%, 0); transition: transform .3s cubic-bezier(.32, .72, 0, 1);
  will-change: transform; backface-visibility: hidden; contain: layout paint;
}
.mo-sheet-root.in .mo-sheet-bg { opacity: 1; }
.mo-sheet-root.in .mo-sheet { transform: none; }
.mo-sheet-drag { flex-shrink: 0; padding-top: 8px; cursor: grab; touch-action: none; }
.mo-sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--text3); opacity: .5; margin: 0 auto 10px; }
.mo-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px 12px 4px; }
.mo-sheet-title { font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.mo-sheet-title span { font-size: 13.5px; font-weight: 700; color: var(--text2); margin-left: 6px; letter-spacing: 0; }
.mo-sheet-close {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; border: 0;
  background: var(--card2); color: var(--text2); cursor: pointer; font-size: 14px; transition: background .15s, transform .1s;
}
.mo-sheet-close:hover { background: var(--card3); }
.mo-sheet-close:active { transform: scale(.9); }
.mo-search {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; margin-bottom: 4px; flex-shrink: 0;
  background: var(--card2); border: 1px solid var(--border2); border-radius: 12px; color: var(--text3); font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.mo-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.mo-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 16px; /* 16px — iOS не увеличивает страницу */
}
.mo-search input::-webkit-search-cancel-button { cursor: pointer; }
.mo-list { flex: 1; min-height: 0; overflow-y: auto; contain: content; overscroll-behavior-y: none; -webkit-overflow-scrolling: touch; touch-action: pan-y; margin: 0 -4px; padding: 0 4px 6px; }
.mo-group {
  position: sticky; top: 0; z-index: 1; padding: 12px 6px 6px; background: var(--card);
  font-size: 13px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--text2);
}
.mo-row {
  width: 100%; display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 8px 8px 8px 6px;
  border: 0; border-radius: 14px; background: transparent; color: var(--text);
  font: inherit; text-align: left; cursor: pointer; transition: background .15s, transform .12s;
}
.mo-row > img { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; object-fit: contain; padding: 3px; background: var(--card2); }
.mo-row-name { flex: 1; min-width: 0; font-size: 16.5px; font-weight: 800; line-height: 1.3; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mo-row-price { font-size: 16px; font-weight: 900; color: var(--accent); white-space: nowrap; }
.mo-row-plus {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 13px;
  transition: background .15s, color .15s, transform .15s;
}
.mo-row-in { font-size: 14px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.mo-row:not(:disabled):active { background: var(--card2); transform: scale(.985); }
@media (hover: hover) {
  .mo-row:not(:disabled):hover { background: var(--card2); }
  .mo-row:not(:disabled):hover .mo-row-plus { background: var(--accent); color: #fff; }
}
.mo-row.is-picked .mo-row-plus { background: var(--accent); color: #fff; transform: scale(1.1); }
.mo-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mo-row:disabled { cursor: default; }
.mo-row:disabled > img, .mo-row:disabled .mo-row-name { opacity: .5; }
.mo-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 0; font-size: 14px; font-weight: 600; color: var(--text3); }
.mo-empty i { font-size: 22px; opacity: .6; }
@media (min-width: 861px) {
  .mo-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%; width: 440px; max-height: min(580px, 80vh);
    border-radius: 20px; padding: 10px 12px 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
    transform: translate(-50%, -47%) scale(.96); opacity: 0;
    transition: transform .24s cubic-bezier(.32, .72, 0, 1), opacity .18s ease;
  }
  .mo-sheet-root.in .mo-sheet { transform: translate(-50%, -50%); opacity: 1; }
  .mo-sheet-drag { cursor: default; padding-top: 4px; touch-action: auto; }
  .mo-list { overscroll-behavior-y: contain; }
  .mo-sheet-grab { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mo-sheet, .mo-sheet-bg { transition-duration: .01s; }
}

/* ── История ── */
.mo-card-items { font-size: 12px; color: var(--text3); margin: 2px 0 6px; display: flex; gap: 6px; align-items: center; }

/* Коды gift card по позициям */
.mo-gc-sep { height: 1px; background: var(--border2); margin: 14px 0; }

/* ── Отзывы и покупки: заказ из нескольких товаров — ряд картинок ── */
.review-product-chip.rv-group { display: block; padding: 10px 12px; }
.rv-thumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-thumb {
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--card); box-shadow: 0 0 0 0 transparent;
  transition: transform .18s cubic-bezier(.22, 1, .36, 1), box-shadow .18s;
  -webkit-tap-highlight-color: transparent;
}
.review-product-chip .rv-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; border-radius: 12px; background: none; }
.rv-thumb:active { transform: scale(.94); }
.rv-thumb.is-on { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--accent); }
@media (hover: hover) { .rv-thumb:hover { transform: translateY(-2px); } }
.rv-more {
  height: 48px; min-width: 48px; padding: 0 8px; border-radius: 12px; background: var(--card);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: var(--text2);
}
.rv-extra { margin-left: auto; }
.rv-cap {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows .22s cubic-bezier(.22, 1, .36, 1), opacity .18s;
}
.rv-cap > div { overflow: hidden; min-height: 0; }
.rv-cap span { display: block; padding-top: 8px; font-size: 13.5px; font-weight: 800; color: var(--text); }
.rv-open .rv-cap { grid-template-rows: 1fr; opacity: 1; }
.rv-cap .apple-emoji { width: 1.15em !important; height: 1.15em !important; min-width: 0 !important; padding: 0 !important; background: none !important; vertical-align: -0.15em; }
