.ticker-track {
  display: flex;
  width: max-content;
  animation: scroll-left linear infinite;
  gap: 2rem;
}

.market-ticker-container.is-clickable {
  cursor: pointer;
  position: relative;
}

.market-ticker-container.is-clickable::after {
  content: 'Click to open Market Watch';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: #1a1a1a;
  background-color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  pointer-events: none;
}

.market-ticker-container.is-clickable:hover::after,
.market-ticker-container.is-clickable:focus-visible::after {
  opacity: 1;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* padding: 0 10px; */
  white-space: nowrap;
  border-right: 2px solid rgba(255, 255, 255, 0.2);
}

.ticker-item:last-child {
  border-right: none;
}

.ticker-symbol {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-orange);
  min-width: 60px;
}

.ticker-price {
  font-weight: 600;
  color: var(--white);
  font-size: 1rem;
  min-width: 100px;
}

.ticker-change {
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 80px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.ticker-change.positive {
  color: #00ff88;
}

.ticker-change.negative {
  color: #ff4444;
}

.ticker-change.no-change {
  color: rgba(255, 255, 255, 0.7);
}

.ticker-error {
  width: 100%;
  text-align: center;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

/* Scrolling Animation */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Pause animation on hover */
.market-ticker-container:hover .ticker-track {
  animation-play-state: paused;
}

/* Loading state animation */
.ticker-loading {
  animation: pulse 1.5s ease-in-out infinite;
}

.market-watch-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1200;
}

.market-watch-modal.is-open {
  display: block;
}

.market-watch-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.market-watch-dialog {
  position: relative;
  width: min(640px, calc(100% - 2rem));
  max-height: calc(100vh - 4rem);
  margin: 2rem auto;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(16, 24, 32, 0.12);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  color: #1f2933;
}

.market-watch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(16, 24, 32, 0.1);
}

.market-watch-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--accent-orange);
}

.market-watch-close {
  border: none;
  background: transparent;
  color: #1f2933;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.market-watch-controls {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  background: #f7f9fc;
  border-bottom: 1px solid rgba(16, 24, 32, 0.08);
}

.market-watch-search,
.market-watch-sort {
  width: 100%;
  border: 1px solid #cfd7df;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2933;
  font-size: 0.92rem;
  padding: 0.6rem 0.75rem;
}

.market-watch-search:focus,
.market-watch-sort:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.15);
}

.market-watch-columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 700;
  color: #66788a;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(16, 24, 32, 0.08);
}

.market-watch-list {
  max-height: calc(100vh - 15rem);
  overflow-y: auto;
}

.market-watch-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(16, 24, 32, 0.08);
}

.market-watch-row:last-child {
  border-bottom: none;
}

.market-watch-symbol {
  font-weight: 700;
  color: var(--accent-orange);
}

.market-watch-price {
  font-weight: 600;
  color: #1f2933;
}

.market-watch-change {
  justify-self: end;
  font-weight: 600;
}

.market-watch-change.positive {
  color: #0f9f56;
}

.market-watch-change.negative {
  color: #dc2626;
}

.market-watch-change.no-change {
  color: #6b7280;
}

.market-watch-loading {
  margin: 0;
  padding: 1.25rem;
  color: #6b7280;
  text-align: center;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ticker-item {
    gap: 0.75rem;
    padding: 0 1rem;
  }

  .market-ticker-container.is-clickable::after {
    display: none;
  }

  .ticker-symbol {
    font-size: 1rem;
    min-width: 50px;
  }

  .ticker-price {
    font-size: 0.9rem;
    min-width: 70px;
  }

  .ticker-change {
    font-size: 0.85rem;
    min-width: 80px;
  }

  .market-watch-dialog {
    width: calc(100% - 1rem);
    margin: 0.5rem auto;
    max-height: calc(100vh - 1rem);
  }

  .market-watch-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .market-watch-controls {
    grid-template-columns: 1fr;
  }

  .market-watch-columns {
    display: none;
  }

  .market-watch-change {
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .ticker-item {
    gap: 0.5rem;
    padding: 0 0.75rem;
  }

  .ticker-symbol {
    font-size: 0.9rem;
    min-width: 45px;
  }

  .ticker-price {
    font-size: 0.85rem;
    min-width: 60px;
  }

  .ticker-change {
    font-size: 0.8rem;
    min-width: 70px;
  }
}