/* ==========================================================================
   OST · Trade Modal Redesign — modern trading sheet
   Loaded AFTER prediction-modal.css; same DOM, new skin + layout.
   Desktop ≥ 980px: two-column grid — market intel left, sticky ticket right.
   Mobile: full-screen sheet, ticket pinned at the natural thumb zone.
   ========================================================================== */

#ost-market-modal .ost-modal__backdrop {
  background: rgba(2, 6, 16, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
}

#ost-market-modal .ost-modal__panel {
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(109, 159, 255, 0.10), transparent 60%),
    linear-gradient(168deg, #0f1526 0%, #090d1a 55%, #070a14 100%);
  border: 1px solid rgba(120, 168, 255, 0.22);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-width: 1060px;
  width: min(1060px, calc(100vw - 28px));
}

#ost-market-modal .ost-modal__close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #cbd5e1;
  font-size: 20px;
  transition: background .15s, transform .15s;
}
#ost-market-modal .ost-modal__close:hover {
  background: rgba(255, 90, 100, 0.18);
  transform: rotate(90deg);
}

/* ---- body becomes a two-column trading layout on desktop --------------- */
@media (min-width: 980px) {
  #ost-market-modal .ost-modal__body {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    gap: 14px 18px;
    align-items: start;
  }
  /* full-width header band */
  #ost-market-modal .ost-modal__tags,
  #ost-market-modal .ost-modal__title,
  #ost-market-modal .ost-modal__detail,
  #ost-market-modal .ost-modal__btc--hero,
  #ost-market-modal .ost-modal__broadcast,
  #ost-market-modal .ost-modal__video {
    grid-column: 1 / -1;
  }
  /* left rail: intel */
  #ost-market-modal .ost-modal__chart,
  #ost-market-modal .ost-modal__book,
  #ost-market-modal .ost-modal__trades,
  #ost-market-modal .ost-modal__shared {
    grid-column: 1;
  }
  /* right rail: the ticket */
  #ost-market-modal .ost-modal__prices,
  #ost-market-modal .ost-modal__outcomes-wrap,
  #ost-market-modal .ost-modal__bet,
  #ost-market-modal .ost-modal__sell {
    grid-column: 2;
  }
  #ost-market-modal .ost-modal__bet {
    position: sticky;
    top: 8px;
  }
}

/* ---- header ------------------------------------------------------------- */
#ost-market-modal .ost-modal__title {
  font-size: 1.32rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #f8fafc;
}
#ost-market-modal .ost-modal__tag {
  background: rgba(109, 159, 255, 0.10);
  border: 1px solid rgba(109, 159, 255, 0.28);
  color: #a9c4ff;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
#ost-market-modal .ost-modal__tag--time {
  background: rgba(245, 196, 104, 0.10);
  border-color: rgba(245, 196, 104, 0.35);
  color: #f5c468;
}

/* ---- every section reads as a card -------------------------------------- */
#ost-market-modal .ost-modal__body > section {
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 14px 16px;
}

/* ---- big yes/no price banner -------------------------------------------- */
#ost-market-modal .ost-modal__prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0;
}
#ost-market-modal .ost-modal__price {
  border-radius: 14px;
  padding: 12px 14px;
  text-align: center;
}
#ost-market-modal .ost-modal__price--yes {
  background: linear-gradient(165deg, rgba(52, 211, 153, 0.14), rgba(52, 211, 153, 0.05));
  border: 1px solid rgba(52, 211, 153, 0.35);
}
#ost-market-modal .ost-modal__price--no {
  background: linear-gradient(165deg, rgba(255, 124, 138, 0.13), rgba(255, 124, 138, 0.05));
  border: 1px solid rgba(255, 124, 138, 0.32);
}
#ost-market-modal .ost-modal__price span {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .8;
}
#ost-market-modal .ost-modal__price strong {
  display: block;
  font-size: 1.9rem;
  font-weight: 900;
  margin-top: 2px;
}
#ost-market-modal .ost-modal__price--yes strong { color: #7ce6a8; }
#ost-market-modal .ost-modal__price--no strong { color: #ff9aa5; }

/* ---- outcome ladder (multi-choice) --------------------------------------- */
#ost-market-modal .ost-modal__outcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 13px;
  margin-bottom: 6px;
  font-weight: 700;
  transition: border-color .15s, background .15s, transform .1s;
}
#ost-market-modal .ost-modal__outcome:hover {
  border-color: rgba(109, 159, 255, 0.5);
  transform: translateX(3px);
}
#ost-market-modal .ost-modal__outcome.is-active {
  background: rgba(109, 159, 255, 0.15);
  border-color: #6d9fff;
  box-shadow: 0 0 0 1px rgba(109, 159, 255, 0.4);
}

/* ---- the ticket ----------------------------------------------------------- */
#ost-market-modal .ost-modal__bet {
  background: linear-gradient(170deg, rgba(245, 196, 104, 0.07), rgba(255, 255, 255, 0.02)) !important;
  border: 1px solid rgba(245, 196, 104, 0.28) !important;
}
#ost-market-modal .ost-modal__bet-head h4 {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #f5c468;
}
#ost-market-modal .ost-modal__side-btn {
  border-radius: 12px;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .03em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  transition: all .15s;
}
#ost-market-modal .ost-modal__side-btn--yes.is-active {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.28), rgba(52, 211, 153, 0.12));
  border-color: #34d399;
  color: #7ce6a8;
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.22);
}
#ost-market-modal .ost-modal__side-btn--no.is-active {
  background: linear-gradient(135deg, rgba(255, 124, 138, 0.26), rgba(255, 124, 138, 0.11));
  border-color: #ff7c8a;
  color: #ff9aa5;
  box-shadow: 0 0 22px rgba(255, 124, 138, 0.20);
}
#ost-market-modal .ost-modal__bet-stake input {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(120, 168, 255, 0.3);
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}
#ost-market-modal .ost-modal__bet-stake input:focus {
  outline: 2px solid #6d9fff;
  border-color: transparent;
}
#ost-market-modal .ost-modal__quick-stakes {
  display: flex;
  gap: 6px;
  margin: 8px 0 2px;
}
#ost-market-modal .ost-modal__quick-stakes button {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #cbd5e1;
  border-radius: 999px;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .12s;
}
#ost-market-modal .ost-modal__quick-stakes button:hover {
  background: rgba(245, 196, 104, 0.15);
  border-color: rgba(245, 196, 104, 0.4);
  color: #f5c468;
}
#ost-market-modal .ost-modal__bet-projected {
  display: block;
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed rgba(245, 196, 104, 0.3);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #fde68a;
}
#ost-market-modal .ost-modal__bet-action {
  background: linear-gradient(135deg, #f5c468, #f59e0b);
  color: #141414;
  border: none;
  border-radius: 13px;
  padding: 15px 0;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .03em;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 0 6px 26px rgba(245, 158, 11, 0.28);
}
#ost-market-modal .ost-modal__bet-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(245, 158, 11, 0.4);
}
#ost-market-modal .ost-modal__bet-action:active {
  transform: translateY(0);
}

/* ---- intel sections ------------------------------------------------------- */
#ost-market-modal .ost-modal__chart-head h4,
#ost-market-modal .ost-modal__book-head h4,
#ost-market-modal .ost-modal__trades-head h4,
#ost-market-modal .ost-modal__sell-head h4,
#ost-market-modal .ost-modal__shared-title {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8ea3c7;
}
#ost-market-modal .ost-modal__book-row {
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
#ost-market-modal .ost-modal__trades-table th {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}
#ost-market-modal .ost-modal__trades-table td {
  font-variant-numeric: tabular-nums;
}

/* ---- 5-min hero (BTC/ETH/SOL native rounds) ------------------------------- */
#ost-market-modal .ost-modal__btc--hero {
  background:
    radial-gradient(600px 200px at 15% 0%, rgba(245, 196, 104, 0.10), transparent 65%),
    rgba(255, 255, 255, 0.028) !important;
  border-color: rgba(245, 196, 104, 0.25) !important;
}

/* ---- mobile: full-screen sheet -------------------------------------------- */
@media (max-width: 979px) {
  #ost-market-modal .ost-modal__panel {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  #ost-market-modal .ost-modal__body > section {
    padding: 12px 13px;
  }
  #ost-market-modal .ost-modal__price strong { font-size: 1.5rem; }
  #ost-market-modal .ost-modal__side-btn { padding: 14px 0; }
  #ost-market-modal .ost-modal__bet-action { padding: 16px 0; }
}
