/* ══════════════════════════════════════════════════════════════════════════
   index.css — Styles used only by the daily chart page (index.html).
   Positioning summary, spike table, insight panels, strategy panel,
   GEX guidance, two-column layout.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Positioning Summary ──────────────────────────────────────────────── */
.positioning-summary {
  font-size: 12px;
  color: #b0bec5;
  background: #1a1d27;
  border: 1px solid #2a2d3e;
  border-radius: 6px;
  padding: 8px 14px;
  margin: 6px 0 4px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ps-row { display: block; line-height: 1.6; }
.ps-label {
  display: inline-block;
  width: 38px;
  color: #546e7a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Volume Spike table ───────────────────────────────────────────────── */
.spike-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.spike-table th {
  text-align: left;
  color: #546e7a;
  font-weight: normal;
  padding: 3px 10px 3px 0;
  border-bottom: 1px solid #2a2d3e;
}
.spike-table td {
  padding: 4px 10px 4px 0;
  color: #b0bec5;
  border-bottom: 1px solid #1e2130;
}

/* ── Strategy Recommendation panel ───────────────────────────────────── */
.strategy-panel {
  background: #1a1d27;
  border: 1px solid #2a2d3e;
  border-radius: 8px;
  padding: 14px 18px 18px;
  margin-top: 4px;
  margin-bottom: 16px;
}

/* ── IV and Gamma insight panels ─────────────────────────────────────── */
.insight-panel {
  background: #1a1d27;
  border: 1px solid #2a2d3e;
  border-radius: 8px;
  padding: 10px 18px 14px;
  margin-top: 4px;
  margin-bottom: 16px;
  min-height: 36px;
}
.insight-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 32px;
  align-items: center;
  margin-bottom: 10px;
}
.insight-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 3px 0;
}
.insight-tip {
  width: 100%;
  margin-top: 4px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid #2a2d3e;
  border-radius: 6px;
}
.insight-unusual {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: rgba(239,83,80,0.08);
  border: 1px solid rgba(239,83,80,0.3);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.insight-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
}
.insight-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  color: #b0bec5;
}
.insight-table th {
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid #2a2d3e;
  color: #78909c;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.insight-table td {
  padding: 3px 8px;
  border-bottom: 1px solid rgba(42,45,62,0.4);
}
.strat-context {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2d3e;
}
.strat-ctx-item {
  font-size: 12px;
  color: #90a4ae;
  padding: 2px 0;
}
.strat-ctx-key {
  color: #546e7a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
  margin-right: 4px;
}
.strat-disclaimer {
  font-size: 10px;
  color: #455a64;
  margin-bottom: 12px;
  line-height: 1.5;
  font-style: italic;
}
.strat-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.strat-card {
  background: #0f1117;
  border: 1px solid #2a2d3e;
  border-radius: 6px;
  padding: 12px 14px;
}
.strat-card-top {
  border-color: #37474f;
}
.strat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.strat-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 3px;
  padding: 1px 6px;
  flex-shrink: 0;
}
.strat-name {
  font-size: 14px;
  font-weight: 700;
  color: #cfd8dc;
  flex: 1;
}
.strat-stars {
  font-size: 12px;
  color: #FFD54F;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.strat-structure {
  font-size: 12px;
  font-weight: 600;
  color: #4ade80;
  font-family: "Fira Mono", "Courier New", monospace;
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.15);
  border-radius: 4px;
  padding: 5px 10px;
  margin-bottom: 8px;
}
.strat-bullets {
  margin: 0 0 8px 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.strat-bullets li {
  font-size: 11px;
  color: #90a4ae;
  line-height: 1.55;
}
.strat-risk {
  font-size: 11px;
  color: #78909c;
  line-height: 1.5;
  padding-top: 6px;
  border-top: 1px solid #1e2130;
}
.strat-risk-label {
  color: #EF9A9A;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

/* ── Leg table ────────────────────────────────────────────────────────── */
.strat-leg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 4px;
  overflow: hidden;
}
.strat-leg-table thead th {
  text-align: left;
  color: #546e7a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 8px;
  border-bottom: 1px solid #2a2d3e;
  background: rgba(255,255,255,0.02);
}
.strat-leg-table tbody tr {
  border-bottom: 1px solid #1e2130;
}
.strat-leg-table tbody tr:last-child { border-bottom: none; }
.strat-leg-table td {
  padding: 5px 8px;
  vertical-align: middle;
}
.strat-leg-action {
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.strat-leg-type   { color: #b0bec5; white-space: nowrap; }
.strat-leg-strike { color: #e0e0e0; font-weight: 600; white-space: nowrap; font-family: "Fira Mono", monospace; }
.strat-leg-expiry { color: #78909c; white-space: nowrap; font-family: "Fira Mono", monospace; font-size: 10px; }
.strat-leg-note   { color: #78909c; line-height: 1.4; }
.strat-leg-group-row { border-bottom: none !important; }
.strat-leg-group-label {
  color: #546e7a;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 6px 2px !important;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.strat-leg-cost {
  font-family: "Fira Mono", monospace;
  font-size: 10px;
  white-space: nowrap;
  text-align: right;
}

/* ── Cost summary ────────────────────────────────────────────────────── */
.strat-cost-summary {
  font-size: 11px;
  padding: 4px 10px;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.02);
  border: 1px solid #1e2130;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-family: "Fira Mono", monospace;
}

/* ── Two-column layout: recommendations + risk profile ───────────── */
.strat-two-col {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
}
@media (max-width: 1200px) {
  .strat-two-col { grid-template-columns: 1fr; }
}
.strat-col-left {
  min-width: 0;
}
.strat-col-right {
  position: sticky;
  top: 60px;
  align-self: start;
}
.strat-risk-label-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.strat-risk-chart-main {
  width: 100%;
  height: 300px;
  background: #0a0c10;
  border: 1px solid #1e2130;
  border-radius: 6px;
}
.strat-card-selected {
  border-color: #64B5F6 !important;
}

/* ── No-match block ───────────────────────────────────────────────────── */
.strat-save-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #1e2130;
}
.strat-save-btn { font-size: 11px; padding: 4px 14px; }

/* ── No-match block (continued) ──────────────────────────────────────── */
.strat-no-match {
  background: rgba(255,255,255,0.02);
  border: 1px solid #2a2d3e;
  border-radius: 6px;
  padding: 12px 14px;
}
.strat-no-match-title {
  font-size: 13px;
  font-weight: 600;
  color: #78909c;
  margin-bottom: 4px;
}
.strat-no-match-sub {
  font-size: 11px;
  color: #546e7a;
  margin-bottom: 8px;
}
.strat-no-match-reasons {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.strat-no-match-reasons li {
  font-size: 11px;
  color: #90a4ae;
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TWO-COLUMN ROW LAYOUT — Daily page (Vol group + OI group)
   ═══════════════════════════════════════════════════════════════════════════ */
.main-container--wide { max-width: 1800px; }

.row-group {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.row-group__charts {
  flex: 3;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.row-group__panels {
  flex: 2;
  min-width: 0;
}

.row-group__panels-inner {
  background: #1a1d27;
  border: 1px solid #2a2d3e;
  border-radius: 8px;
  padding: 10px 14px 14px;
  overflow-y: auto;
}

/* Panel items inside grouped card — tighten margins */
.row-group__panels-inner .chart-section-label { margin-top: 10px; }
.row-group__panels-inner .chart-section-label:first-child { margin-top: 4px; }
.row-group__panels-inner .insight-panel { margin-top: 2px; margin-bottom: 8px; }
.row-group__panels-inner .gex-panel { margin-top: 2px; margin-bottom: 4px; }
.row-group__panels-inner .glossary { margin-top: 4px; border-radius: 6px; }
.row-group__panels-inner .positioning-summary { margin: 4px 0; }

/* Responsive — collapse to single column on narrow screens */
@media (max-width: 1200px) {
  .main-container--wide { max-width: 1400px; }
  .row-group { flex-direction: column; }
  .row-group__charts, .row-group__panels { flex: none; width: 100%; height: auto !important; }
  .row-group__panels-inner { max-height: none !important; height: auto; }
}
