/* ===============================
   PANELS.CSS — ЛЕВАЯ И ПРАВАЯ ПАНЕЛИ
   =============================== */

/* ======== ЛЕВАЯ ПАНЕЛЬ ======== */
#left-panel {
  background: #141922;
  border-radius: 8px;
  border: 1px solid #222;
  overflow: hidden;
  display: flex;
}

#chart {
  flex: 1;
  width: 100%;
  height: 100%;
  background: #141922;
}

/* ======== ПРАВАЯ ПАНЕЛЬ ======== */
#right-panel {
  background: #1b1f28;
  border: 1px solid #222;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  height: 100%;
}

/* Фиксированная шапка */
.sticky-header {
  position: sticky;
  top: 0;
  background: #1b1f28;
  z-index: 2;
  padding: 10px;
  border-bottom: 1px solid #2a2f38;
}

.panel-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #00e896;
  text-align: center;
}

/* Поле поиска */
#search {
  background: #141922;
  border: 1px solid #2a2f38;
  border-radius: 6px;
  padding: 6px 10px;
  color: #e0e3ea;
  font-size: 14px;
  width: 100%;
  margin-top: 6px;
}

#search:focus {
  outline: none;
  border-color: #00e89680;
  box-shadow: 0 0 6px rgba(0, 232, 150, 0.3);
}

/* Прокрутка таблицы */
.table-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  padding: 0 10px 10px 10px;
  white-space: nowrap;
}

/* Таблица тикеров */
.tickers,
.tickers-head {
  min-width: 420px;
}

.tickers-head {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tickers-head th {
  text-align: left;
  padding-bottom: 6px;
  border-bottom: 1px solid #2a2f38;
  font-weight: 600;
  color: #9da3b0;
}

.tickers {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tickers td {
  padding: 6px 0;
  border-bottom: 1px solid #20242b;
}

.pos { color: #26ff91; }
.neg { color: #ff3b5c; }

.tickers tr.active-row {
  background: rgba(0, 232, 150, 0.12);
  box-shadow: inset 0 0 10px rgba(0, 232, 150, 0.25);
}

.tickers tr:hover {
  background: rgba(0, 232, 150, 0.08);
  cursor: pointer;
}

/* Кликабельные заголовки */
.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}
.sortable:hover { color: #00e896; }

.sym-cell {
  padding-left: 10px !important;
}
.tickers td:first-child {
  padding-left: 10px !important;
}

/* Фиксация выравнивания колонок */
.tickers-head,
.tickers {
  table-layout: fixed;
  width: 100%;
}

.tickers-head th,
.tickers td {
  width: 25%;
  text-align: left;
  padding: 6px 8px;
  box-sizing: border-box;
}

.tickers-head th:first-child,
.tickers td:first-child {
  padding-left: 10px;
}

/* ======== ПЕРЕКЛЮЧЕНИЕ ПРАВОЙ ПАНЕЛИ ======== */
.layout.collapsed {
  grid-template-columns: 1fr !important;
}

.layout.collapsed #right-panel {
  display: none !important;
}

#right-panel.collapsed {
  display: none;
}

/* ======== АДАПТИВ ======== */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  #right-panel { display: none; }
}
/* ======= ФЛАГИ ТИКЕРОВ ======= */
.flag {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  margin-right: 6px;
  border: 1px solid #333;
  display: inline-block;
}

.flag.none { background-color: #444; }
.flag.green { background-color: #00e896; }
.flag.red { background-color: #ff3b5c; }
.flag.yellow { background-color: #ffd166; }
.flag.blue { background-color: #3399ff; }

/* ======= ВЫПАДАЮЩЕЕ МЕНЮ ФЛАГОВ ======= */
.flag-menu {
  position: absolute;
  background: #1a1d24;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 6px;
  display: flex;
  gap: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  z-index: 2000;
}

.flag-option {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid #333;
}
.flag-option.none { background-color: #444; }
.flag-option.green { background-color: #00e896; }
.flag-option.red { background-color: #ff3b5c; }
.flag-option.yellow { background-color: #ffd166; }
.flag-option.blue { background-color: #3399ff; }

/* ======== СЧЁТЧИК ОПОВЕЩЕНИЙ ======== */
.alert-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  margin-left: 8px;
  background-color: #ffb955;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
  vertical-align: middle;
}
/* ===============================
   MARKET SENTIMENT BLOCK
   =============================== */

#market-block {
    margin-top: 10px;
    margin-bottom: 12px;
    text-align: center;
    font-size: 13px;
    color: #ccc;
}

/* Заголовок */
.market-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #00e896;
    text-align: center;
}

/* Ряд 24h — проценты и шкала */
.market-bar-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

/* Левый/правый проценты */
.market-percent {
    width: 42px;
    text-align: center;
    font-size: 12px;
    color: #ccc;
}

/* Шкала */
.market-bar {
    width: 170px;        /* <<< Узкая и аккуратная */
    height: 6px;
    background: #222;
    position: relative;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
}

/* Зелёная часть */
#sent24-green {
    background: #00e896;
    height: 100%;
}

/* Красная часть */
#sent24-red {
    background: #ff3b5c;
    height: 100%;
}

/* Подзаголовок 1h */
.market-hour {
    margin-top: 4px;
    font-size: 12px;
    color: #888;
    text-align: center;
}

/* Значение 1h */
.market-hour-value {
    color: #ffb955;
    font-weight: 500;
}
/* ============================================================
   MARKET SENTIMENT BLOCK (24h + 1h)
   ============================================================ */

/* === Контейнер всего блока === */
#market-block {
    margin-top: 10px;
    margin-bottom: 12px;
    color: #ccc;
    font-size: 13px;
}

/* Заголовок по центру */
.market-title {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #00e896;
}

/* Верхняя строка — шкала + проценты + правая колонка */
.market-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Левая часть со шкалой */
.market-bar-container {
    flex-grow: 1;
}

/* Строка шкалы */
.market-bar-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Проценты слева/справа */
.market-percent-left,
.market-percent-right {
    width: 40px;
    text-align: center;
    font-size: 12px;
}

/* Шкала */
.market-bar {
    width: 170px;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
}

/* Цвета частей */
#sent24-green {
    background: #00e896;
    height: 100%;
}

#sent24-red {
    background: #ff3b5c;
    height: 100%;
}

/* Правая часть (строго в линию с шкалой) */
.market-hour-side {
    white-space: nowrap;
    text-align: right;
    margin-left: 12px;
    font-size: 12px;
}

/* ЦВЕТ ИЗМЕНЕНИЯ ЗА ЧАС */
#sent1h-value {
    font-weight: 600;
}

/* красный */
.negative {
    color: #ff3b5c;
}

/* зелёный */
.positive {
    color: #00e896;
}
/* === Market Block: скрыт до загрузки === */
.hidden-block {
    visibility: hidden;
}

/* === Показывать после загрузки реальных данных === */
.hidden-block.ready {
    visibility: visible;
}


