/* Pro Charts — trading workspace and indexed-sale cards. */
.page-pro-charts,
.page-pro-charts > *,
.pro-telemetry-hud,
.pro-toolbar,
.pro-toolbar-left,
.pro-chart-types,
.pro-indicators,
.pro-timeframes,
.recent-sales-strip,
.sales-strip-grid,
.sale-card,
.sale-card-info {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.page-pro-charts {
  width: 100%;
  color: #e5eaf1;
}

.pro-telemetry-hud {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .13);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(17, 25, 38, .96), rgba(8, 13, 22, .98));
  box-shadow: 0 14px 40px rgba(0, 0, 0, .16);
}

.hud-primary-identity {
  gap: 16px;
}

.hud-brand-pill,
.hud-live-metrics {
  min-width: 0;
  flex-wrap: wrap;
}

.hud-live-metrics {
  flex: 1 1 520px;
}

.hud-metric-box {
  min-width: 0;
}

.hud-metric-val {
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-ohlcv-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: rgba(148, 163, 184, .09);
}

.hud-ohlcv-strip .ohlcv-item {
  min-width: 0;
  padding: 10px 14px;
  background: #0b111b;
}

.hud-ohlcv-strip .ohlcv-item .lbl,
.hud-ohlcv-strip .ohlcv-item .val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 12px;
  background: rgba(12, 18, 29, .92);
}

.pro-toolbar-left {
  display: flex;
  flex: 1 1 720px;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pro-chart-types,
.pro-indicators,
.pro-timeframes,
.pro-view-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, .10);
  border-radius: 8px;
  background: rgba(4, 8, 14, .56);
}

.pro-toolbar .pro-btn,
.pro-toolbar .indicator-toggle,
.pro-toolbar .tf-btn,
.pro-toolbar .pro-clip-btn,
.pro-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 32px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #8d9aaf;
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.pro-toolbar .pro-btn:hover,
.pro-toolbar .indicator-toggle:hover,
.pro-toolbar .tf-btn:hover,
.pro-toolbar .pro-clip-btn:hover,
.pro-view-btn:hover {
  color: #e8eef7;
  background: rgba(148, 163, 184, .09);
}

.pro-toolbar .pro-btn.active,
.pro-toolbar .tf-btn.active,
.pro-view-btn:active {
  color: #f4f7fb;
  border-color: rgba(76, 201, 240, .24);
  background: rgba(76, 201, 240, .12);
}

.pro-toolbar .indicator-toggle.active-ema {
  color: #4cc9f0;
  background: rgba(76, 201, 240, .10);
}

.pro-toolbar .indicator-toggle.active-ma {
  color: #f0b90b;
  background: rgba(240, 185, 11, .09);
}

.pro-toolbar .indicator-toggle.active-vol {
  color: #a9b6c8;
  background: rgba(148, 163, 184, .10);
}

.pro-toolbar .pro-clip-btn.active {
  color: #f0b90b;
  border-color: rgba(240, 185, 11, .18);
  background: rgba(240, 185, 11, .07);
}

.chart-coverage-note {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.pro-chart-container {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 540px !important;
  padding: 0 !important;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .14) !important;
  border-radius: 14px !important;
  background: #080d15 !important;
  box-shadow: 0 20px 54px rgba(0, 0, 0, .20), inset 0 1px 0 rgba(255, 255, 255, .018);
  isolation: isolate;
}

.pro-chart-container canvas {
  display: block;
  max-width: 100%;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.pro-chart-container .pro-rich-tooltip {
  position: absolute;
  z-index: 10;
  width: min(236px, calc(100% - 16px));
  max-width: calc(100% - 16px);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 10px;
  color: #dbe4ef;
  background: rgba(9, 15, 25, .97);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .48);
  backdrop-filter: blur(14px);
}

.pro-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-width: 0;
  padding: 10px 4px;
}

.pro-legend .legend-group {
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.pro-legend .legend-item {
  white-space: nowrap;
}

.recent-sales-strip {
  width: 100%;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(15, 22, 34, .96), rgba(8, 13, 21, .98));
}

.sales-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, .09);
}

.sales-strip-header .strip-title {
  min-width: 0;
  flex-wrap: wrap;
  gap: 7px;
}

.sales-strip-header .strip-meta {
  max-width: 100%;
  line-height: 1.5;
}

.sales-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  padding: 14px;
}

.sale-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 116px;
  margin: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .11);
  border-radius: 12px;
  background: rgba(10, 16, 26, .88);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.sale-card:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 166, 154, .30);
  background: rgba(14, 23, 35, .96);
}

.sale-card-thumb-wrap {
  position: relative;
  display: block;
  flex: none;
  width: 86px;
  height: 86px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .17);
  border-radius: 10px;
  background: #111a27;
}

.sale-card-thumb {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.sale-card-info {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 7px;
  width: 100%;
  overflow: hidden;
}

.sale-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.sale-ape-name {
  min-width: 0;
  overflow: hidden;
  color: #edf2f8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-time {
  flex: none;
  padding-top: 1px;
  color: #7b899d;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  line-height: 1.4;
  white-space: nowrap;
}

.sale-card-context {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 18px;
}

.sale-card .rank-pill {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  min-height: 18px;
  margin: 0;
  padding: 2px 7px;
  overflow: hidden;
  border-radius: 5px;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-card .rank-pill.grail {
  color: #f7c94b;
  border: 1px solid rgba(240, 185, 11, .25);
  background: rgba(240, 185, 11, .10);
}

.sale-card .rank-pill.legendary {
  color: #c28cff;
  border: 1px solid rgba(168, 85, 247, .26);
  background: rgba(168, 85, 247, .11);
}

.sale-card .rank-pill.floor {
  color: #5bd2bd;
  border: 1px solid rgba(38, 166, 154, .24);
  background: rgba(38, 166, 154, .10);
}

.sale-card-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}

.sale-eth-price {
  color: #43c6b1;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.sale-usd-price {
  color: #8795a9;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  white-space: nowrap;
}

.sale-card-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.sale-card .sale-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 5px;
  color: #94a3b8;
  background: rgba(148, 163, 184, .035);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.sale-card .sale-link-btn:hover {
  color: #d9e4ef;
  border-color: rgba(76, 201, 240, .28);
  background: rgba(76, 201, 240, .07);
}

.hud-ohlcv-strip .ohlcv-item .sub-usd {
  display: block;
  margin-top: 2px;
}

@media (max-width: 1199px) {
  .hud-ohlcv-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .pro-toolbar-left {
    flex-basis: 100%;
  }
}

@media (max-width: 767px) {
  .hud-primary-identity {
    align-items: flex-start;
  }

  .hud-live-metrics {
    flex-basis: 100%;
    width: 100%;
  }

  .hud-metric-box {
    flex: 1 1 30%;
  }

  .hud-ohlcv-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pro-chart-container {
    height: 460px !important;
  }

  .pro-toolbar {
    align-items: stretch;
    padding: 8px;
  }

  .pro-toolbar-left {
    flex-basis: 100%;
    gap: 7px;
  }

  .pro-chart-types {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pro-toolbar .pro-btn,
  .pro-toolbar .indicator-toggle,
  .pro-toolbar .tf-btn,
  .pro-toolbar .pro-clip-btn,
  .pro-view-btn {
    min-height: 36px;
    padding: 6px 8px;
  }

  .pro-timeframes {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pro-timeframes .tf-btn {
    width: 100%;
    padding-right: 4px;
    padding-left: 4px;
  }

  .sales-strip-header {
    align-items: flex-start;
    padding: 12px;
  }

  .sales-strip-grid {
    gap: 10px;
    padding: 12px;
  }

  .sale-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    min-height: 108px;
    padding: 12px;
  }

  .sale-card-thumb-wrap {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 560px) {
  .hud-ohlcv-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-strip-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pro-chart-container {
    height: 430px !important;
    min-height: 340px;
    border-radius: 11px !important;
  }

  .pro-legend {
    gap: 6px;
  }

  .pro-legend .legend-group {
    gap: 6px 10px;
  }

  .pro-legend .legend-item {
    font-size: 9px;
  }

  .sale-card:hover {
    transform: none;
  }
}

@media (max-width: 360px) {
  .sale-card {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .sale-card-thumb-wrap {
    width: 66px;
    height: 66px;
  }

  .sale-ape-name,
  .sale-eth-price {
    font-size: 12px;
  }

  .sale-time {
    font-size: 8px;
  }
}

/* Persistent period metrics with an additional, equally sized hover row. */
.hud-period-strip,
.hud-hover-strip {
  box-sizing: border-box;
  flex: 0 0 100%;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  margin: 0;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.hud-period-strip {
  order: 1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hud-hover-strip {
  order: 2;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hud-ohlcv-strip .ohlcv-item {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  min-height: 66px;
  padding: 10px 14px;
  line-height: 1.25;
}

.hud-ohlcv-strip .ohlcv-item .lbl {
  max-width: 100%;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: .04em;
}

.hud-ohlcv-strip .ohlcv-item .val {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 5px;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: 11px;
  line-height: 1.3;
}

.hud-ohlcv-strip .ohlcv-item .sub-usd {
  display: inline;
  margin-top: 0;
  white-space: nowrap;
  font-size: 9px;
  line-height: 1.25;
}

@media (max-width: 1199px) {
  .hud-period-strip,
  .hud-hover-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .hud-ohlcv-strip .ohlcv-item {
    min-height: 64px;
    padding: 10px 12px;
  }
}

@media (max-width: 560px) {
  .hud-period-strip,
  .hud-hover-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hud-ohlcv-strip .ohlcv-item {
    min-height: 68px;
    padding: 10px;
  }

  .hud-ohlcv-strip .ohlcv-item .lbl {
    font-size: 8px;
  }

  .hud-ohlcv-strip .ohlcv-item .val {
    font-size: 10px;
  }
}
