/* 🔥 Active Trades Container */
.active-trades-block {
  margin-top: 10px;
}

.row-content-active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 5px;
  padding-top: 10px;
}

.trade-item {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 10px;
  border-radius: 4px;

  font-size: 13px;
  font-weight: 500;

  border: 1px solid #2f2f2f;
  color: #777;

  cursor: pointer;
  transition: all 0.2s ease;
}

/* 🟢 ACTIVE */
.trade-item.active {
  background: #9c9c9c14;
  border: 1px solid #22c55e;
  color: #414141;
}

/* ⚪ INACTIVE */
.trade-item.inactive {
  background: #bbbbbb61;
  border: 1px solid #ababab;
  color: #a0a0a0;
}

.trade-item.selected {
  border: 2px solid #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.trade-item:hover {
  transform: translateY(-1px);
}

.trade-symbol {
  font-weight: 500;
  font-size: 14px;
}

.trade-symbol.inactive-text {
  opacity: 0.5;
}

/* 💓 Pulse animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 6px #00ff88;
  }
  40% {
    transform: scale(1.6);
    opacity: 0.2;
    box-shadow: 0 0 14px #00ff88;
  }
  70% {
    transform: scale(1.2);
    opacity: 0.5;
    box-shadow: 0 0 8px #00ff88;
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 6px #00ff88;
  }
}

/* ❌ Empty state */
.no-active {
  width: 100%;
  text-align: center;
  opacity: 0.7;
  font-size: 14px;
}

/* 📱 Mobile */
@media (max-width: 768px) {
  .trade-symbol {
    font-size: 13px;
  }

  .row-content-active {
    gap: 8px;
  }
}

/* tooltip container */
.trade-item {
  position: relative;
}

/* tooltip */
.trade-item::after {
  content: "Open Chart";
  position: absolute;

  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);

  background: rgba(15, 23, 42, 0.95);
  color: rgba(226, 232, 240, 0.95);

  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;

  white-space: nowrap;

  opacity: 0;
  pointer-events: none;

  transition: all 0.15s ease;

  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* show tooltip */
.trade-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 📱 Mobile optimization */
@media (max-width: 768px) {
  .trade-item::after {
    display: none;
  }

  .row-content-active {
    gap: 6px;
    padding-top: 8px;
  }

  .trade-item {
    padding: 0 8px;
    border-radius: 4px;

    font-size: 12px;
    font-weight: 500;
  }

  .trade-item.selected {
    border-width: 1.5px;
    box-shadow:
      0 0 0 1px rgba(25, 195, 125, 0.3),
      0 0 6px rgba(16, 185, 129, 0.35);
  }
}

/* ============================= */
/* 🌙 DARK MODE – Active Trades */
/* ============================= */

body.dark .trade-item {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: rgba(203, 213, 225, 0.85);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 16px rgba(0, 0, 0, 0.35);

  transition: all 0.2s ease;
}

/* 🟢 ACTIVE */
body.dark .trade-item.active {
  background: rgba(25, 195, 125, 0.08);
  border: 1px solid rgba(25, 195, 125, 0.6);
  color: rgba(226, 232, 240, 0.95);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(25, 195, 125, 0.25),
    0 10px 24px rgba(16, 185, 129, 0.18);
}

/* ⚪ INACTIVE */
body.dark .trade-item.inactive {
  background: rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: rgba(148, 163, 184, 0.55);
}

/* 🔥 SELECTED (focus state як у premium UI) */
body.dark .trade-item.selected {
  border: 2px solid #19c37d;
  background: rgba(25, 195, 125, 0.12);
  color: #ffffff;

  box-shadow:
    0 0 0 1px rgba(25, 195, 125, 0.35),
    0 0 12px rgba(16, 185, 129, 0.45),
    0 12px 30px rgba(0, 0, 0, 0.45);
}

/* hover */
body.dark .trade-item:hover {
  background: rgba(15, 23, 42, 0.65);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.45);
}

/* ❌ empty */
body.dark .no-active {
  color: rgba(148, 163, 184, 0.7);
}

body.dark .trade-item::after {
  background: rgba(15, 23, 42, 0.95);
  color: rgba(226, 232, 240, 0.95);
}
