/* Outlytic My Predictions v1.8.2 */

.prediction-page-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prediction-page-buttons form {
  margin: 0;
}

.prediction-replay-panel,
.prediction-columns-panel,
.prediction-chart-panel,
.prediction-disclosure {
  margin-bottom: 16px;
}

.prediction-disclosure {
  padding: 0;
  overflow: hidden;
}

.prediction-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.prediction-disclosure > summary::-webkit-details-marker {
  display: none;
}

.prediction-disclosure > summary span:first-child {
  display: grid;
  gap: 4px;
}

.prediction-disclosure > summary small {
  color: var(--muted, #9aa6b2);
  font-weight: 400;
}

.prediction-disclosure-action {
  flex: 0 0 auto;
  color: var(--muted, #9aa6b2);
  font-size: .78rem;
  font-weight: 700;
}

.prediction-disclosure[open] .prediction-disclosure-action {
  visibility: hidden;
}

.prediction-settings-body,
.prediction-disclosure-content {
  padding: 0 18px 18px;
}

.prediction-config-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prediction-method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.prediction-method-grid div {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--ot-line, rgba(255,255,255,.12));
  border-radius: 10px;
  background: rgba(255,255,255,.025);
}

.prediction-method-grid span {
  color: var(--muted, #9aa6b2);
  font-size: .82rem;
  line-height: 1.4;
}

.prediction-replay-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.prediction-step-form {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) minmax(130px, .65fr) auto;
  align-items: end;
  gap: 10px;
  width: min(760px, 100%);
}

.prediction-input-suffix {
  display: grid;
  grid-template-columns: minmax(70px, .45fr) minmax(145px, 1fr);
  align-items: center;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--ot-line, rgba(255,255,255,.13));
  border-radius: 8px;
  background: rgba(255,255,255,.025);
}

.prediction-input-suffix input {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.prediction-input-suffix span {
  padding: 0 10px;
  color: var(--muted, #9aa6b2);
  font-size: .78rem;
  white-space: nowrap;
  border-left: 1px solid var(--ot-line, rgba(255,255,255,.13));
}

.prediction-current-read {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--ot-line, rgba(255,255,255,.12));
  border-radius: 12px;
  background: rgba(255,255,255,.018);
}

.prediction-current-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.prediction-current-heading h2 {
  margin: 3px 0 0;
}

.prediction-agreement-pill {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
}

.prediction-agreement-pill.long,
.prediction-state-badge.long {
  box-shadow: inset 0 0 0 1px rgba(71, 215, 126, .45);
}

.prediction-agreement-pill.short,
.prediction-state-badge.short {
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, .45);
}

.prediction-agreement-pill.mixed {
  box-shadow: inset 0 0 0 1px rgba(255, 188, 72, .45);
}

.prediction-current-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.prediction-current-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--ot-line, rgba(255,255,255,.12));
  border-radius: 10px;
  background: rgba(255,255,255,.025);
}

.prediction-current-card span,
.prediction-system-summary span,
.prediction-detail-grid span {
  color: var(--muted, #9aa6b2);
  font-size: .72rem;
}

.prediction-current-card strong {
  font-size: 1.03rem;
}

.prediction-current-card small {
  color: var(--muted, #9aa6b2);
  line-height: 1.35;
}

.prediction-main-chart .lab-chart {
  margin-top: 8px;
}

.prediction-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.prediction-side-group {
  padding: 12px;
  border: 1px solid var(--ot-line, rgba(255,255,255,.12));
  border-radius: 11px;
  background: rgba(255,255,255,.018);
}

.prediction-side-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.prediction-side-title span {
  font-weight: 800;
}

.prediction-side-title small {
  color: var(--muted, #9aa6b2);
}

.prediction-column-grid {
  display: grid;
  gap: 10px;
}

.prediction-column-grid.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prediction-column-card {
  display: grid;
  gap: 6px;
  min-height: 105px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
}

.prediction-column-card span {
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.prediction-column-card strong {
  font-size: 1.45rem;
}

.prediction-column-card small {
  line-height: 1.35;
  opacity: .82;
}

.prediction-column-card.long-lower {
  background: rgba(44, 181, 92, .17);
}

.prediction-column-card.short-risk {
  background: rgba(214, 73, 208, .17);
}

.prediction-column-card.long-upper {
  background: rgba(224, 70, 70, .17);
}

.prediction-column-card.short-target {
  background: rgba(55, 205, 221, .17);
}

.prediction-system-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.prediction-system-card .panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.prediction-state-badge {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.prediction-system-summary,
.prediction-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.prediction-system-summary div,
.prediction-detail-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--ot-line, rgba(255,255,255,.12));
  border-radius: 9px;
  background: rgba(255,255,255,.025);
}

.prediction-system-summary strong,
.prediction-detail-grid strong {
  overflow-wrap: anywhere;
}

.prediction-live-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.signal-pill {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: rgba(255,255,255,.06);
}

.signal-pill.long {
  background: rgba(44, 181, 92, .18);
}

.signal-pill.short {
  background: rgba(224, 70, 70, .18);
}

.signal-pill.neutral {
  color: var(--muted, #9aa6b2);
}

.prediction-inner-section + .prediction-inner-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--ot-line, rgba(255,255,255,.12));
}

.prediction-inner-section h3 {
  margin-bottom: 4px;
}

.prediction-inner-section p {
  margin-top: 0;
  color: var(--muted, #9aa6b2);
}

@media (max-width: 1180px) {
  .prediction-method-grid,
  .prediction-current-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prediction-system-summary,
  .prediction-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .prediction-side-grid,
  .prediction-system-grid {
    grid-template-columns: 1fr;
  }

  .prediction-replay-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .prediction-step-form {
    grid-template-columns: 1fr 1fr;
  }

  .prediction-step-form .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .prediction-config-form,
  .prediction-step-form,
  .prediction-method-grid,
  .prediction-current-grid,
  .prediction-column-grid.two-column,
  .prediction-system-summary,
  .prediction-detail-grid {
    grid-template-columns: 1fr;
  }

  .prediction-step-form .button {
    grid-column: auto;
  }

  .prediction-current-heading,
  .prediction-side-title,
  .prediction-disclosure > summary {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* v1.8.3 strategy P/L */
.prediction-pl-panel {
  margin-bottom: 16px;
}

.prediction-ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.prediction-ledger-card {
  padding: 14px;
  border: 1px solid var(--ot-line, rgba(255,255,255,.12));
  border-radius: 11px;
  background: rgba(255,255,255,.022);
}

.prediction-ledger-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.prediction-ledger-heading > div {
  display: grid;
  gap: 4px;
}

.prediction-ledger-heading span {
  color: var(--muted, #9aa6b2);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.prediction-ledger-heading strong {
  font-size: 1.65rem;
}

.prediction-ledger-heading small {
  color: var(--muted, #9aa6b2);
}

.prediction-ledger-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.prediction-ledger-metrics div {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--ot-line, rgba(255,255,255,.11));
  border-radius: 8px;
  background: rgba(255,255,255,.024);
}

.prediction-ledger-metrics span,
.prediction-open-trade span {
  color: var(--muted, #9aa6b2);
  font-size: .71rem;
}

.prediction-open-trade {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 5px 12px;
  margin-top: 10px;
  padding: 11px;
  border-radius: 9px;
  background: rgba(255,255,255,.035);
}

.prediction-open-trade strong {
  justify-self: end;
}

.prediction-open-trade small {
  grid-column: 1 / -1;
  color: var(--muted, #9aa6b2);
}

.prediction-pl-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted, #9aa6b2);
  background: rgba(255,255,255,.025);
  font-size: .82rem;
  line-height: 1.45;
}

.positive {
  color: #5ce28a;
}

.negative {
  color: #ff7777;
}

.trade-side {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
}

.trade-side.long {
  background: rgba(44, 181, 92, .18);
}

.trade-side.short {
  background: rgba(224, 70, 70, .18);
}

.prediction-trade-table {
  min-width: 1180px;
}

@media (max-width: 1000px) {
  .prediction-ledger-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .prediction-ledger-grid {
    grid-template-columns: 1fr;
  }
}


/* v1.8.4 ThinkScript-matched advanced band colors */
.advanced-band-groups {
  display: grid;
  gap: 18px;
}

.advanced-band-group {
  display: grid;
  gap: 10px;
}

.advanced-band-group + .advanced-band-group {
  padding-top: 16px;
  border-top: 1px solid var(--ot-line, rgba(255,255,255,.12));
}

.advanced-band-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.advanced-band-heading small {
  color: var(--muted, #9aa6b2);
  text-align: right;
}

.advanced-band-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.advanced-band-card {
  position: relative;
  overflow: hidden;
  min-height: 100px;
  padding: 13px 13px 13px 16px !important;
  border-color: var(--band-accent, rgba(255,255,255,.15)) !important;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--band-accent, #ffffff) 18%, transparent),
      rgba(255,255,255,.018) 64%
    ) !important;
}

.advanced-band-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--band-accent, rgba(255,255,255,.3));
}

.advanced-band-card span {
  color: color-mix(in srgb, var(--band-accent, #ffffff) 72%, white) !important;
  font-weight: 700;
}

.advanced-band-card strong {
  font-size: 1.18rem;
}

.advanced-band-card small {
  color: var(--muted, #9aa6b2);
  line-height: 1.35;
}

/* Original ThinkScript colors */
.band-long-upper-tight {
  --band-accent: #8b5cf6;
}

.band-long-lower-tight {
  --band-accent: #d97706;
}

.band-short-target-tight {
  --band-accent: #ef4444;
}

.band-short-risk-tight {
  --band-accent: #22c55e;
}

.band-short-call-wide {
  --band-accent: #d946ef;
}

.band-short-put-wide {
  --band-accent: #16a34a;
}

.band-short-outer-upper {
  --band-accent: #ec4899;
}

.band-short-outer-lower {
  --band-accent: #06b6d4;
}

.move-positive {
  --band-accent: #22c55e;
}

.move-negative {
  --band-accent: #ef4444;
}

.move-neutral {
  --band-accent: #64748b;
}

.average-move-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@supports not (background: color-mix(in srgb, red 20%, transparent)) {
  .advanced-band-card {
    background: rgba(255,255,255,.025) !important;
  }
}

@media (max-width: 1100px) {
  .advanced-band-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .advanced-band-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .advanced-band-heading small {
    text-align: left;
  }

  .advanced-band-grid,
  .average-move-grid {
    grid-template-columns: 1fr;
  }
}


/* v1.8.5 advanced levels nested inside Current prediction levels */
.prediction-levels-divider {
  height: 1px;
  margin: 18px 0 0;
  background: var(--ot-line, rgba(255,255,255,.12));
}

.prediction-levels-advanced {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.prediction-levels-advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 2px 13px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.prediction-levels-advanced > summary::-webkit-details-marker {
  display: none;
}

.prediction-levels-advanced > summary span:first-child {
  display: grid;
  gap: 4px;
}

.prediction-levels-advanced > summary small {
  color: var(--muted, #9aa6b2);
  font-weight: 400;
}

.prediction-levels-advanced[open] > summary {
  margin-bottom: 13px;
  border-bottom: 1px solid var(--ot-line, rgba(255,255,255,.10));
}

.prediction-levels-advanced[open] .prediction-disclosure-action {
  visibility: hidden;
}

.prediction-levels-advanced .prediction-disclosure-content {
  padding: 0 0 4px;
}

@media (max-width: 620px) {
  .prediction-levels-advanced > summary {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* v1.8.6 explicit live/replay mode */
.prediction-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--ot-line, rgba(255,255,255,.12));
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
}

.prediction-mode-badge.live {
  border-color: rgba(34,197,94,.42);
  background: rgba(34,197,94,.10);
}

.prediction-mode-badge.replay {
  border-color: rgba(245,158,11,.46);
  background: rgba(245,158,11,.11);
}

.prediction-replay-offset-field[hidden] {
  display: none !important;
}

@media (max-width: 620px) {
  .prediction-mode-badge {
    width: 100%;
    justify-content: center;
  }
}
