/* public/guest/guest.css — гостевое биржевое меню (телефон, вертикаль).
   Тёмный лофт-бренд, плавные появления карточек, живые вспышки цены. Только theme.css токены. */

html, body { height: 100%; }
body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overscroll-behavior-y: none;
}

/* ── Шапка ── */
.g-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
}
.g-logo {
  height: 44px;
  flex: 0 0 auto;
}
.g-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.g-title {
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g-subtitle {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}
.g-table {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--orange-soft);
  border-color: var(--orange-dim);
  background: rgba(255, 122, 24, .08);
  font-size: 12px;
}

/* ── Лента Happy Hour ── */
.g-hh {
  position: sticky;
  top: 0;
  z-index: 19;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 16px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #1a0e04;
  background: linear-gradient(180deg, #ff9b3d, #e2680f);
  border-bottom: 1px solid #ffae5e;
  box-shadow: 0 6px 22px rgba(255, 122, 24, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  animation: g-hh-in var(--dur-slow) var(--ease-out) both;
}
.g-hh[hidden] { display: none; }
.g-hh-icon {
  font-size: 16px;
  animation: g-hh-bob 1.8s ease-in-out infinite;
}
.g-hh-pct {
  font-size: 14px;
  padding: 1px 9px;
  border-radius: 999px;
  background: rgba(26, 14, 4, .22);
  letter-spacing: .06em;
}
@keyframes g-hh-in { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes g-hh-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2px) rotate(-8deg); } }

/* ── Основная область ── */
.g-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 14px 18px;
}
.g-connect {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 40px 16px;
  animation: fade-up var(--dur-slow) var(--ease-out) both;
}
.g-empty {
  text-align: center;
  color: var(--muted2);
  padding: 48px 16px;
}

.g-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Карточка сорта ── */
.g-card {
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.g-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.g-art { flex: 0 0 auto; align-self: flex-start; margin-top: 1px; }
.g-art .sort-photo { width: 52px; height: 52px; }
.g-card-id { min-width: 0; flex: 1; }
.g-desc {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.g-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.2;
}
.g-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}
.g-ticker {
  color: var(--orange-soft);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
}
.g-dot { color: var(--muted2); }

/* Цена */
.g-price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}
.g-market {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted2);
  text-decoration: line-through;
  text-decoration-color: var(--down);
  opacity: .85;
}
.g-market[hidden] { display: none; }
.g-price {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  padding: 1px 4px;
  margin: -1px -4px;
  border-radius: var(--radius-sm);
  transition: color var(--dur) var(--ease);
}
.g-price.is-hh {
  color: var(--orange-soft);
  text-shadow: 0 0 14px rgba(255, 122, 24, .35);
}
.g-chg {
  font-size: 12px;
  padding: 2px 9px;
}

/* Бейджи */
.g-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.g-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  border: 1px solid var(--line2);
}
.g-badge.scarce { color: var(--scarce); border-color: #6b4f1e; background: rgba(224, 162, 58, .1); }
.g-badge.sold   { color: var(--down); border-color: var(--down-dim); background: rgba(226, 72, 74, .12); }
.g-badge.halt   { color: var(--muted); border-color: var(--line2); background: rgba(0, 0, 0, .25); }

/* Подвал карточки */
.g-card-foot {
  display: flex;
}
.g-order {
  width: 100%;
  padding: 11px 16px;
  font-size: 15px;
}

/* Состояния */
.g-card.is-sold,
.g-card.is-halt {
  opacity: .62;
}
.g-card.is-sold .g-price,
.g-card.is-halt .g-price {
  color: var(--muted);
}
.g-card.is-sold:hover,
.g-card.is-halt:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .03);
}

/* ── Подвал ── */
.g-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  font-size: 12px;
  color: var(--muted2);
  letter-spacing: .02em;
}
.g-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 8px rgba(58, 217, 138, .7);
  animation: g-pulse 2.2s ease-in-out infinite;
}
@keyframes g-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.82); }
}

/* ── Модалка заказа к бармену ── */
.g-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.g-modal[hidden] { display: none; }
.g-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 2, .68);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade-in var(--dur) var(--ease-out) both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.g-modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 10px;
  margin-bottom: max(10px, env(safe-area-inset-bottom));
  padding: 24px 22px 22px;
  text-align: center;
  box-shadow: var(--shadow-3), var(--glow-soft);
}
.g-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: fade-in var(--dur) var(--ease-out) both;
}
.g-step[hidden] { display: none; }

.g-modal-emoji {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 2px;
  color: var(--orange-soft);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4));
}
.g-modal-emoji.ok { color: var(--up); }
.g-modal-emoji.err { color: var(--down); }
.g-modal-emoji.warn { color: var(--scarce); }
.g-modal-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--orange-soft);
}
.g-modal-title.ok { color: var(--up); }
.g-modal-title.err { color: var(--down); }
.g-modal-sort {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .02em;
  margin-top: 2px;
}
.g-modal-text {
  margin: 6px 0 4px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

/* Степпер количества */
.g-qty {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 12px 0 4px;
}
.g-qty-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--orange-soft);
  background: linear-gradient(180deg, #281d15, #160f0b);
  border: 1px solid var(--line2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.g-qty-btn:hover { border-color: var(--orange-dim); box-shadow: var(--glow-soft); }
.g-qty-btn:active { transform: scale(.92); }
.g-qty-btn:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; transform: none; }
.g-qty-val {
  font-size: 30px;
  font-weight: 700;
  min-width: 44px;
  color: var(--text);
}

/* Цена в модалке */
.g-modal-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin: 8px 0 4px;
  padding: 12px 15px;
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .25);
}
.g-modal-price-label {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .03em;
  text-transform: uppercase;
  text-align: left;
}
.g-modal-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.g-modal-market {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted2);
  text-decoration: line-through;
  text-decoration-color: var(--down);
}
.g-modal-market[hidden] { display: none; }
.g-modal-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--orange-soft);
}
.g-modal-price.is-hh { text-shadow: 0 0 14px rgba(255, 122, 24, .35); }
.g-modal-hhnote {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--orange-soft);
  letter-spacing: .02em;
  margin: 2px 0 8px;
}
.g-modal-hhnote[hidden] { display: none; }

.g-modal-go { width: 100%; margin-top: 10px; padding: 13px 18px; font-size: 16px; }
.g-modal-cancel { margin-top: 2px; opacity: .8; }
.g-modal-ok { width: 100%; margin-top: 8px; }

/* Спиннер ожидания */
.g-spinner {
  width: 44px;
  height: 44px;
  margin: 6px 0 4px;
  border-radius: 50%;
  border: 3px solid var(--line2);
  border-top-color: var(--orange);
  animation: g-spin .8s linear infinite;
  box-shadow: var(--glow-soft);
}
@keyframes g-spin { to { transform: rotate(360deg); } }

/* Чуть просторнее на больших экранах — центрируем модалку */
@media (min-width: 560px) {
  .g-modal { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .g-spinner { animation-duration: 1.4s; }
  .g-hh-icon { animation: none; }
}

/* ── Кабинет трейдера (DEV-08) ── */
.g-portfolio-btn {
  margin-left: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #e8ddc9);
  background: rgba(60, 45, 34, .35);
  border: 1px solid var(--line, #3c2d22);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.g-portfolio-btn.is-on { color: #1a120b; background: var(--orange, #ff7a18); border-color: var(--orange, #ff7a18); }

.g-input {
  width: 100%;
  font: inherit;
  color: var(--text, #e8ddc9);
  background: rgba(0, 0, 0, .25);
  border: 1px solid var(--line, #3c2d22);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.g-input:focus { outline: none; border-color: var(--orange, #ff7a18); }

.g-pf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.g-pf-hi { font-size: 15px; color: var(--text-dim, #9a8f80); }
.g-pf-hi b { color: var(--text, #e8ddc9); }
.g-pf-total { text-align: center; margin-bottom: 14px; }
.g-pf-pnl { font-size: 40px; font-weight: 800; line-height: 1.1; color: var(--text, #e8ddc9); }
.g-pf-pnl.up { color: var(--up, #3ad98a); }
.g-pf-pnl.down { color: var(--down, #e2484a); }
.g-pf-sub { font-size: 13px; color: var(--text-dim, #9a8f80); margin-top: 4px; }

.g-pf-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 46vh; overflow-y: auto; }
.g-pf-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, .2);
  border: 1px solid var(--line, #3c2d22);
  border-radius: 12px;
}
.g-pf-item-name { font-weight: 700; }
.g-pf-item-meta { font-size: 12px; color: var(--text-dim, #9a8f80); margin-top: 2px; }
.g-pf-item-pnl { font-weight: 800; font-size: 16px; white-space: nowrap; }
.g-pf-item-pnl.up { color: var(--up, #3ad98a); }
.g-pf-item-pnl.down { color: var(--down, #e2484a); }
.g-pf-empty { text-align: center; color: var(--text-dim, #9a8f80); padding: 20px 8px; font-size: 14px; }
.g-pf-note { font-size: 11px; color: var(--text-dim, #9a8f80); text-align: center; margin: 0 0 12px; opacity: .85; }

/* ── Тренды над меню + навигация (DEV-20) ── */
.g-home { flex: 0 0 auto; display: inline-flex; }
.g-trends { margin: 0 0 12px; }
.g-trends-head { font-weight: 800; font-size: 14px; margin: 0 2px 8px; }
.g-trends-head [data-ic] { display: inline-flex; vertical-align: -0.16em; margin-right: 6px; }
.g-trends-head .ic { color: var(--orange-soft, #ffb877); }
.g-trends-sub { color: var(--muted, #9a8f80); font-weight: 600; font-size: 12px; margin-left: 6px; }
.g-trends-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.g-trend {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 12px; border-radius: 12px; min-width: 92px;
  background: rgba(0, 0, 0, .22); border: 1px solid var(--line, #3c2d22);
}
.g-trend.up { border-color: rgba(58, 217, 138, .4); }
.g-trend.down { border-color: rgba(226, 72, 74, .4); }
.g-trend-tick { color: var(--orange-soft, #ffb877); font-weight: 700; font-size: 13px; }
.g-trend-price { font-weight: 700; font-size: 15px; }
.g-trend-chg { font-weight: 800; font-size: 13px; }
.g-trend.up .g-trend-chg { color: var(--up, #3ad98a); }
.g-trend.down .g-trend-chg { color: var(--down, #e2484a); }

.g-result-cabinet { margin-top: 10px; font-size: 13px; color: var(--up, #3ad98a); font-weight: 600; line-height: 1.4; }

/* ── Меню: некотируемые позиции (еда/закуски) (DEV-24) ── */
.g-menu { margin-top: 22px; }
.g-menu-cat {
  font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange-soft, #ffb877); margin: 16px 2px 8px;
}
.g-menu-list { display: flex; flex-direction: column; gap: 10px; }
.g-menu-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.g-menu-main { flex: 1; min-width: 0; }
.g-menu-name { font-weight: 700; font-size: 15px; }
.g-menu-desc { font-size: 12.5px; line-height: 1.35; color: var(--muted, #9a8f80); margin-top: 3px; }
.g-menu-right { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: 0 0 auto; }
.g-menu-price { font-weight: 800; font-size: 16px; }

/* ── Статус заказа: плашка между шапкой и меню (отправлено → готовится → готов) ── */
.g-order-status {
  margin: 0; padding: 12px 16px;
  text-align: center; font-weight: 800; font-size: 14px; line-height: 1.4;
  border-bottom: 1px solid var(--line);
  animation: g-hh-in var(--dur, .3s) var(--ease-out, ease) both;
}
.g-order-status[hidden] { display: none; }
.g-order-status.sent { color: var(--orange-soft); background: rgba(255, 122, 24, .1); border-color: var(--orange-dim); }
.g-order-status.accepted { color: var(--scarce, #e0a23a); background: rgba(224, 162, 58, .12); border-color: #6b4f1e; }
.g-order-status.ready { color: #0e1a10; background: linear-gradient(180deg, #57e08f, #2bb56a); border-color: #6ee6a0; box-shadow: 0 6px 20px rgba(58, 217, 138, .35); animation: g-ready-pulse 1.6s ease-in-out infinite; }
.g-order-status.declined { color: var(--down); background: rgba(226, 72, 74, .1); border-color: var(--down-dim); }
@keyframes g-ready-pulse { 50% { filter: brightness(1.08); } }

/* ── Плавающая корзина ── */
.g-cart-bar {
  position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 45; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 16px; cursor: pointer; font: inherit;
  color: #1a0e04; background: linear-gradient(180deg, #ffb247, #ff7a18);
  border: 1px solid #ffc46a; box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 22px rgba(255, 122, 24, .35);
  max-width: 536px; margin: 0 auto; -webkit-tap-highlight-color: transparent;
}
.g-cart-bar[hidden] { display: none; }
.g-cart-bar.bump { animation: g-cart-bump .35s var(--ease-out, ease); }
@keyframes g-cart-bump { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.g-cart-bar-left, .g-cart-bar-right { display: inline-flex; align-items: center; gap: 9px; }
.g-cart-badge {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(26, 14, 4, .25); font-weight: 900; font-size: 13px;
}
.g-cart-bar-label { font-weight: 800; font-size: 15px; }
.g-cart-bar-right { font-weight: 900; }
.g-cart-bar-go { padding: 6px 12px; border-radius: 999px; background: rgba(26, 14, 4, .22); font-size: 14px; }

/* ── Модалка корзины ── */
.g-cart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.g-cart-x {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; cursor: pointer;
  background: rgba(0, 0, 0, .25); border: 1px solid var(--line2); position: relative;
}
.g-cart-x::before, .g-cart-x::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 13px; height: 2px; background: var(--muted);
  transform: translate(-50%, -50%) rotate(45deg);
}
.g-cart-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.g-cart-empty { text-align: center; color: var(--muted2); padding: 26px 8px; font-size: 14px; }
.g-cart-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; margin-bottom: 12px; }
.g-cart-row {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line);
}
.g-cart-row.is-food { border-color: #5a4322; background: rgba(255, 155, 61, .07); }
.g-cart-info { flex: 1; min-width: 0; }
.g-cart-name { font-weight: 700; font-size: 14px; }
.g-cart-unit { font-size: 12px; margin-top: 2px; }
.g-cart-stepper { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.g-qty-sm { width: 32px; height: 32px; font-size: 19px; }
.g-cart-q { min-width: 1.4em; text-align: center; font-weight: 800; }
.g-cart-line { flex: 0 0 auto; min-width: 4.2em; text-align: right; font-weight: 800; }
.g-cart-foot[hidden] { display: none; }
.g-cart-contact-row { margin-bottom: 8px; }
.g-cart-total-row { display: flex; align-items: baseline; justify-content: space-between; font-weight: 900; font-size: 18px; margin: 4px 0 10px; }
.g-cart-total-row .mono { color: var(--orange-soft); }
.g-cart-note { font-size: 11px; text-align: center; margin: 12px 0 0; opacity: .85; line-height: 1.4; }
#g-cart-clear { width: 100%; margin-top: 6px; opacity: .8; }
