/* ===== Market Overview - Vestex Dark Theme ===== */

/* Ticker Strip */
.mo-ticker-strip {
  display: flex;
  gap: 12px;
  padding: 0 0 8px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #1e293b transparent;
}
.mo-ticker-strip::-webkit-scrollbar { height: 4px; }
.mo-ticker-strip::-webkit-scrollbar-track { background: transparent; }
.mo-ticker-strip::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 2px; }

.mo-ticker-card {
  flex: 0 0 180px;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 14px 16px 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.mo-ticker-card:hover {
  border-color: #5cb8e6;
  box-shadow: 0 0 16px rgba(92,184,230,0.08);
}

.mo-ticker-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.mo-ticker-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}
.mo-ticker-pair {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.mo-ticker-base {
  font-weight: 600;
  font-size: 14px;
  color: #f1f5f9;
}
.mo-ticker-quote {
  font-size: 11px;
  color: #64748b;
  font-weight: 400;
}

.mo-ticker-price {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.mo-ticker-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.mo-ticker-change.positive { color: #22c55e; }
.mo-ticker-change.negative { color: #ef4444; }

.mo-sparkline {
  width: 100%;
  height: 28px;
  margin-top: 6px;
  display: block;
}
.mo-sparkline path.spark-line { stroke-width: 1.5; fill: none; }
.mo-sparkline path.spark-fill { opacity: 0.1; }

/* Table Section */
.mo-table-section {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  margin-top: 16px;
  overflow: hidden;
}

/* Controls: Tabs + Search */
.mo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.mo-tabs {
  display: flex;
  gap: 4px;
  background: #0d1117;
  border-radius: 8px;
  padding: 3px;
}
.mo-tab {
  background: none;
  border: none;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.mo-tab:hover { color: #94a3b8; }
.mo-tab.active {
  background: #1e293b;
  color: #f1f5f9;
}
.mo-tab-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(92,184,230,0.12);
  color: #5cb8e6;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.mo-search-wrap {
  position: relative;
  width: 260px;
  min-width: 180px;
}
.mo-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #475569;
  pointer-events: none;
}
.mo-search {
  width: 100%;
  background: #0d1117;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 8px 12px 8px 36px;
  color: #f1f5f9;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.mo-search::placeholder { color: #475569; }
.mo-search:focus { border-color: #5cb8e6; }

/* Stats Bar */
.mo-stats-bar {
  display: flex;
  gap: 24px;
  padding: 12px 20px;
  border-bottom: 1px solid #1e293b;
  flex-wrap: wrap;
}
.mo-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mo-stat-label {
  font-size: 12px;
  color: #64748b;
}
.mo-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  font-variant-numeric: tabular-nums;
}
.mo-stat-value.positive { color: #22c55e; }
.mo-stat-value.negative { color: #ef4444; }

/* Table */
.mo-table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #1e293b transparent;
}
.mo-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}
.mo-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}
.mo-table th {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  text-align: left;
  border-bottom: 1px solid #1e293b;
  background: #111827;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.mo-table th:hover { color: #94a3b8; }
.mo-table th .sort-icon { margin-left: 4px; vertical-align: middle; }
.mo-table th.sort-asc .sort-icon path:first-child { opacity: 1; }
.mo-table th.sort-desc .sort-icon path:last-child { opacity: 1; }

.mo-th-price, .mo-th-change, .mo-th-high, .mo-th-low, .mo-th-vol { text-align: right; }
.mo-th-chart { text-align: center; width: 100px; }

.mo-table td {
  padding: 12px 16px;
  font-size: 13px;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(30,41,59,0.5);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.mo-table tbody tr {
  transition: background 0.15s;
}
.mo-table tbody tr:hover {
  background: rgba(92,184,230,0.03);
}

/* Pair cell */
.mo-pair-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mo-pair-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}
.mo-pair-info { display: flex; flex-direction: column; }
.mo-pair-name {
  font-weight: 600;
  font-size: 13px;
  color: #f1f5f9;
}
.mo-pair-exchange {
  font-size: 11px;
  color: #64748b;
}

/* Price cells */
.mo-td-price, .mo-td-high, .mo-td-low, .mo-td-vol { text-align: right; }
.mo-td-change { text-align: right; }
.mo-td-change.positive { color: #22c55e; }
.mo-td-change.negative { color: #ef4444; }

/* Price flash */
.mo-price-up { animation: flashGreen 0.6s ease; }
.mo-price-down { animation: flashRed 0.6s ease; }
@keyframes flashGreen {
  0% { background: rgba(34,197,94,0.15); }
  100% { background: transparent; }
}
@keyframes flashRed {
  0% { background: rgba(239,68,68,0.15); }
  100% { background: transparent; }
}

/* Mini chart in table */
.mo-td-chart { text-align: center; }
.mo-mini-spark {
  width: 80px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
}
.mo-mini-spark path.spark-line { stroke-width: 1.2; fill: none; }

/* Loading state */
.mo-loading-row td {
  text-align: center;
  padding: 48px 16px;
  color: #64748b;
  font-size: 14px;
}
.mo-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #1e293b;
  border-top-color: #5cb8e6;
  border-radius: 50%;
  animation: moSpin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes moSpin { to { transform: rotate(360deg); } }

/* Empty state */
.mo-empty-row td {
  text-align: center;
  padding: 48px 16px;
  color: #475569;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .mo-ticker-card { flex: 0 0 156px; padding: 12px 14px 8px; }
  .mo-controls { flex-direction: column; align-items: stretch; }
  .mo-search-wrap { width: 100%; }
  .mo-tabs { overflow-x: auto; }
  .mo-stats-bar { gap: 16px; }
}
