/* Страница заказа (_renderOrderDetail в script.js).
 * Панель → главный статус → «чек» (получатель, позиции, итог) → действия.
 * Цвет — только у статуса; остальное на нейтральных тонах темы. */
.od4 {
  --od-ok: #10b981; --od-work: #3b82f6; --od-wait: #f59e0b; --od-fail: #ef4444; --od-part: #f59e0b; --od-muted: #8b93a1; --od-refund: #6366f1;
  --od-surface: var(--card);
  --od-line: color-mix(in srgb, var(--text) 8%, transparent);
  --od-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 28px rgba(0, 0, 0, .08);
  max-width: 520px; margin: 0 auto; padding: 4px 16px 32px;
  color: var(--text);
}
.od4--ok { --od-c: var(--od-ok); }
.od4--work { --od-c: var(--od-work); }
.od4--wait { --od-c: var(--od-wait); }
.od4--fail { --od-c: var(--od-fail); }
.od4--part { --od-c: var(--od-part); }
.od4--muted { --od-c: var(--od-muted); }
.od4--refund { --od-c: var(--od-refund); }

/* ── Панель ── */
.od4-bar { display: flex; align-items: center; gap: 8px; height: 52px; }
.od4-bar-title { flex: 1; text-align: center; font-size: 15px; font-weight: 800; color: var(--text2); letter-spacing: .01em; }
.od4-icon-btn {
  width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--text); font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s;
}
.od4-icon-btn:hover { background: var(--card2); }
.od4-icon-btn:active { transform: scale(.92); }
.od4-icon-btn.od4-copied { color: var(--od-ok); }

/* ── Главный статус ── */
.od4-hero { position: relative; text-align: center; padding: 18px 8px 26px; isolation: isolate; }
.od4-hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -10px; width: 280px; height: 200px; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--od-c) 22%, transparent), transparent);
  pointer-events: none;
}
.od4-hero-ic {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--od-c); color: #fff; font-size: 28px;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--od-c) 16%, transparent), 0 10px 30px color-mix(in srgb, var(--od-c) 40%, transparent);
  animation: od4-pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.od4--muted .od4-hero-ic { box-shadow: 0 0 0 8px color-mix(in srgb, var(--od-c) 14%, transparent); }
@keyframes od4-pop { from { transform: scale(.6); opacity: 0; } }
.od4-spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: od4-rot .9s linear infinite;
}
@keyframes od4-rot { to { transform: rotate(360deg); } }
.od4-hero-title { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 900; letter-spacing: -.02em; color: var(--text); }
.od4-hero-sub { margin: 8px auto 0; max-width: 340px; font-size: 14.5px; line-height: 1.45; font-weight: 600; color: var(--text2); }
.od4-hero-cta { margin-top: 20px; }

/* Шаги: Оплата → Выдача → Готово */
.od4-steps {
  list-style: none; margin: 20px auto 0; padding: 0; max-width: 300px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  font-size: 12px; font-weight: 700; color: var(--text3);
}
.od4-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.od4-steps li span {
  position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%;
  background: var(--card2); box-shadow: inset 0 0 0 2px var(--od-line);
}
.od4-steps li + li::before {
  content: ""; position: absolute; top: 5px; right: 50%; width: 100%; height: 2px; background: var(--od-line);
}
.od4-steps li.is-done, .od4-steps li.is-now { color: var(--text); }
.od4-steps li.is-done span { background: var(--od-c); box-shadow: none; }
.od4-steps li.is-done + li::before { background: var(--od-c); }
.od4-steps li.is-now span { background: var(--od-c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--od-c) 25%, transparent); animation: od4-beat 1.6s ease-in-out infinite; }
@keyframes od4-beat { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--od-c) 0%, transparent); } }

/* ── Кнопки ── */
.od4-btn {
  position: relative; width: 100%; height: 52px; border: 0; border-radius: 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 15.5px; font-weight: 800; text-decoration: none;
  transition: transform .1s, filter .15s, background .15s;
}
.od4-btn:active { transform: scale(.98); }
.od4-btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.od4-btn--primary:hover { filter: brightness(1.06); }
.od4-btn--soft { background: var(--od-surface); color: var(--text); box-shadow: var(--od-shadow); }
.od4-btn--soft i { color: var(--accent); }
.od4-btn--soft:hover { background: var(--card2); }
.od4-btn:disabled { opacity: .7; cursor: default; }
.od4-badge { position: static !important; margin-left: 2px; }

/* ── «Чек» ── */
.od4-sheet { background: var(--od-surface); border-radius: 22px; box-shadow: var(--od-shadow); padding: 4px 18px 0; }
.od4-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--od-line); }
.od4-game { font-size: 14px; font-weight: 800; color: var(--text); white-space: nowrap; }
.od4-who {
  min-width: 0; display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 0 6px 8px;
  border: 0; background: none; cursor: pointer; font: inherit; color: var(--text3); font-size: 12.5px; font-weight: 600;
}
.od4-who b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 14px; font-weight: 800; }
.od4-who i { font-size: 12px; color: var(--text3); transition: color .15s; }
.od4-who:hover i { color: var(--accent); }
.od4-who i.od4-copied { color: var(--od-ok); }

.od4-lines { list-style: none; margin: 0; padding: 2px 0; }
.od4-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.od4-line + .od4-line { border-top: 1px solid var(--od-line); }
.od4-line-img { width: 46px; height: 46px; flex-shrink: 0; object-fit: contain; border-radius: 12px; background: var(--card2); padding: 4px; }
.od4-line-main { flex: 1; min-width: 0; }
.od4-line-name { font-size: 15px; font-weight: 800; line-height: 1.3; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.od4-line-name img { width: auto; height: 1.05em; vertical-align: -0.12em; }
/* Статус позиции: иконка 15px + слово, цвет — по статусу */
.od4-line-st { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; font-weight: 800; line-height: 1; color: var(--od-lc); }
.od4-line-st > i { font-size: 15px; }
.od4-loader {
  width: 15px; height: 15px; flex-shrink: 0; border-radius: 50%; box-sizing: border-box;
  border: 2px solid color-mix(in srgb, var(--od-work) 25%, transparent); border-top-color: var(--od-work);
  animation: od4-rot .8s linear infinite;
}
.od4-line-note { margin-top: 4px; font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--text3); }
.od4-line-refund { display: flex; align-items: baseline; gap: 6px; color: var(--text2); }
.od4-line-refund i { font-size: 11px; color: var(--od-ok); }
.od4-line-price { flex-shrink: 0; font-size: 15px; font-weight: 800; color: var(--text); white-space: nowrap; }
.od4-line-price.is-struck { color: var(--text3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.od4-line.is-failed .od4-line-img { filter: grayscale(1); opacity: .6; }
.od4-c--ok { --od-lc: var(--od-ok); color: var(--od-ok); }
.od4-c--work { --od-lc: var(--od-work); color: var(--od-work); }
.od4-c--fail { --od-lc: var(--od-fail); color: var(--od-fail); }
.od4-c--refund { --od-lc: var(--od-refund); color: var(--od-refund); }

.od4-sum { margin: 0; padding: 12px 0; border-top: 1px dashed color-mix(in srgb, var(--text) 16%, transparent); display: flex; flex-direction: column; gap: 6px; }
.od4-sum > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; font-weight: 600; color: var(--text2); }
.od4-sum dt, .od4-sum dd { margin: 0; }
.od4-sum dd { font-weight: 700; color: var(--text); white-space: nowrap; }
.od4-sum dd.od4-c--ok { color: var(--od-ok); }
.od4-sum .od4-sum-total { padding-top: 2px; color: var(--text); font-weight: 800; font-size: 15px; }
.od4-sum .od4-sum-total dd { font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.od4-meta {
  display: flex; justify-content: space-between; gap: 12px; margin: 0 -18px; padding: 11px 18px;
  border-top: 1px solid var(--od-line); font-size: 12.5px; font-weight: 600; color: var(--text3);
}

/* Gift card и действия — в том же стиле, что «чек» */
.od4 .gc-card { margin: 12px 0 0; border: 0; border-radius: 22px; background: var(--od-surface); box-shadow: var(--od-shadow); }
.od4-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

@media (min-width: 861px) {
  .od4 { padding-top: 16px; }
  .od4-hero { padding-top: 26px; }
  .od4-hero-title { font-size: 30px; }
}
@media (max-width: 360px) {
  .od4 { padding-left: 12px; padding-right: 12px; }
  .od4-sheet { padding: 4px 14px 0; }
  .od4-meta { margin: 0 -14px; padding: 11px 14px; }
  .od4-hero-title { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .od4-hero-ic, .od4-spin, .od4-steps li.is-now span, .od4-loader { animation: none !important; }
}
