/* TEST1 -> V71 SAFE UI STEP 3
   Safe non-destructive V71 MARKET / Chart selector; keeps TEST1 candle/feed/orderbook logic untouched. */

body.terminal-active .gp-market-overview,
body.gp-terminal-active .gp-market-overview {
  background: #000 !important;
  border-color: rgba(255,255,255,.10) !important;
}

body.terminal-active .gp-overview-market--switch,
body.gp-terminal-active .gp-overview-market--switch {
  min-width: 292px !important;
  max-width: 360px !important;
  display: grid !important;
  grid-template-rows: auto auto auto !important;
  gap: 7px !important;
  align-content: center !important;
  padding: 12px 14px !important;
  border-color: rgba(0, 224, 255, .18) !important;
  background: linear-gradient(180deg, rgba(2, 7, 15, .98), rgba(0, 0, 0, .98)) !important;
  box-shadow: none !important;
}

body.terminal-active .gp-overview-market--switch > span,
body.gp-terminal-active .gp-overview-market--switch > span {
  color: rgba(134, 188, 255, .92) !important;
  font: 900 10px/1.05 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: .13em !important;
  text-transform: uppercase !important;
}

body.terminal-active .gp-overview-market--switch > span b,
body.gp-terminal-active .gp-overview-market--switch > span b {
  color: #f4f8ff !important;
}

.gp-market-type-switch {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.gp-market-type-switch button {
  appearance: none !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  min-height: 27px !important;
  padding: 0 9px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  background: #06080d !important;
  color: rgba(244,247,255,.86) !important;
  font: 950 9px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: background .14s ease, color .14s ease, border-color .14s ease, transform .14s ease !important;
}

.gp-market-type-switch button:hover {
  border-color: rgba(0,224,255,.36) !important;
  background: rgba(255,255,255,.075) !important;
}

.gp-market-type-switch button:active {
  transform: translateY(1px) !important;
}

.gp-market-type-switch button.active,
.gp-market-type-switch button.is-active,
.gp-market-type-switch button[aria-pressed="true"] {
  color: #ffffff !important;
  border-color: rgba(0,224,255,.48) !important;
  background: linear-gradient(135deg, rgba(0,167,255,.32), rgba(0,239,191,.24)) !important;
}

.gp-market-symbol-row {
  display: grid !important;
  grid-template-columns: minmax(88px, 1fr) minmax(110px, 1.05fr) !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.gp-market-symbol-row strong,
body.terminal-active .gp-market-symbol-row strong,
body.gp-terminal-active .gp-market-symbol-row strong {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(0,126,255,.34) !important;
  background: #020b17 !important;
  color: #f5f9ff !important;
  font: 950 17px/1 JetBrains Mono, SFMono-Regular, Consolas, monospace !important;
  letter-spacing: .02em !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.gp-market-instrument-select,
#gp-market-instrument-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 100% !important;
  min-width: 106px !important;
  min-height: 32px !important;
  padding: 0 30px 0 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(0,126,255,.38) !important;
  color: #e8f5ff !important;
  background:
    linear-gradient(45deg, transparent 50%, #7cc8ff 50%) right 12px center/6px 6px no-repeat,
    linear-gradient(135deg, #031122, #020913) !important;
  font: 900 11px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  cursor: pointer !important;
  outline: none !important;
}

#gp-market-instrument-select:focus,
#gp-market-instrument-select:hover {
  border-color: rgba(0,224,255,.55) !important;
  box-shadow: 0 0 0 2px rgba(0,224,255,.10) !important;
}

#gp-market-instrument-select option,
.gp-market-instrument-select option {
  background: #07162b !important;
  color: #f2f8ff !important;
}

.gp-overview-market--switch.is-switching {
  opacity: .82 !important;
}

.gp-overview-market--switch.is-switching::after {
  content: "SYNC";
  justify-self: end;
  margin-top: -4px;
  color: rgba(0, 240, 190, .84);
  font: 950 8px/1 Inter, sans-serif;
  letter-spacing: .16em;
}

@media (max-width: 1380px) {
  body.terminal-active .gp-overview-market--switch,
  body.gp-terminal-active .gp-overview-market--switch {
    min-width: 258px !important;
    max-width: 300px !important;
    padding-inline: 10px !important;
  }
  .gp-market-symbol-row {
    grid-template-columns: minmax(78px, .95fr) minmax(96px, 1fr) !important;
  }
  .gp-market-symbol-row strong {
    font-size: 14px !important;
    padding-inline: 9px !important;
  }
  .gp-market-type-switch button {
    padding-inline: 5px !important;
    font-size: 8px !important;
  }
}

@media (max-width: 760px) {
  body.terminal-active .gp-overview-market--switch,
  body.gp-terminal-active .gp-overview-market--switch {
    min-width: 100% !important;
    max-width: none !important;
  }
}
