/* SUPERDBOT — Live Digit Analyzer */

/* ── Toolbar icon ─────────────────────────────── */
.sdb-da-toolbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
  color: var(--text-prominent, #d4d4d8) !important;
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  margin: 0 2px;
}
.sdb-da-toolbar-icon:hover {
  color: #ffffff !important;
  background: rgba(255,255,255,0.08);
}
.sdb-da-toolbar-icon--active {
  color: #6ea8ff !important;
  background: rgba(110,168,255,0.13);
}
.sdb-da-toolbar-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

/* ── Floating panel ────────────────────────────── */
.sdb-da-panel {
  position: fixed;
  right: 16px;
  top: 56px;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 72px);
  background: #0e1117;
  color: #e8eaed;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 99999;
  font-family: inherit;
  font-size: 13px;
}
.sdb-da-panel--open { display: flex; }

.sdb-da-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(180deg, #161a22 0%, #0e1117 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sdb-da-title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
}
.sdb-da-close {
  background: transparent;
  border: 0;
  color: #b8bcc6;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.sdb-da-close:hover { color: #fff; }

.sdb-da-legend {
  padding: 10px 14px;
  font-size: 11.5px;
  color: #9aa1ad;
  background: #11151c;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  line-height: 1.45;
}
.sdb-da-body {
  overflow-y: auto;
  padding: 6px 8px 12px;
}

/* ── Market rows ─────────────────────────────── */
.sdb-da-row {
  background: #151a23;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 6px;
}
.sdb-da-row--loading {
  color: #9aa1ad;
  text-align: center;
  font-style: italic;
}
.sdb-da-row--ready {
  border-color: rgba(80, 220, 100, 0.45);
  background: linear-gradient(180deg, rgba(80,220,100,0.08), rgba(80,220,100,0.02));
  box-shadow: 0 0 0 1px rgba(80,220,100,0.15) inset;
}
.sdb-da-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.sdb-da-mkt { font-weight: 700; color: #f1f3f5; font-size: 13px; }
.sdb-setup {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.sdb-setup--over  { background: rgba(80,220,100,0.15);  color: #6fe48a; border: 1px solid rgba(80,220,100,0.4); }
.sdb-setup--under { background: rgba(255,110,110,0.15); color: #ff8989; border: 1px solid rgba(255,110,110,0.4); }
.sdb-setup--idle  { background: rgba(255,255,255,0.05); color: #8a8f99; border: 1px solid rgba(255,255,255,0.06); text-transform: lowercase; letter-spacing: 0.2px; }

.sdb-da-chips { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.sdb-da-prec { font-size: 9.5px; color: #6c727c; text-transform: uppercase; letter-spacing: 0.5px; margin-right: 2px; }
.sdb-digit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 11.5px;
  background: #1f2530;
  color: #cfd3da;
}
.sdb-digit--low  { background: rgba(120,180,255,0.18); color: #8fbfff; }
.sdb-digit--high { background: rgba(255,140,110,0.18); color: #ffa080; }
.sdb-digit--mid  { background: rgba(255,220,100,0.18); color: #ffd560; }
.sdb-digit--hl   { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 1px; }

.sdb-da-bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: #0a0d12; margin-bottom: 6px; }
.sdb-da-bar__low  { background: #5a9bff; }
.sdb-da-bar__mid  { background: #ffd560; }
.sdb-da-bar__high { background: #ff8a6b; }

.sdb-da-stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 10.5px; color: #8a8f99; }
.sdb-da-stat--low   { color: #8fbfff; }
.sdb-da-stat--mid   { color: #ffd560; }
.sdb-da-stat--high  { color: #ffa080; }
.sdb-da-stat--ticks { margin-left: auto; opacity: 0.7; }

@media (max-width: 768px) {
  .sdb-da-panel { right: 8px; top: 52px; width: calc(100vw - 16px); }
}
