/**
 * Forex Ticker - Modern Style (Horizontal)
 */

/* Base container */
.forex-ticker {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #333;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  position: relative;
  overflow: hidden;
}

/* Reset box-sizing for all elements */
.forex-ticker *,
.forex-ticker *:before,
.forex-ticker *:after {
  box-sizing: border-box;
}

/* Container */
.forex-ticker-container {
  width: 100%;
  background-color: transparent;
  overflow: hidden;
}

/* Wrapper - handles scrolling behavior */
.forex-ticker-wrapper {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  user-select: none;
  cursor: grab;
}

.forex-ticker-wrapper.dragging {
  cursor: grabbing;
}

/* Items container with animation */
.forex-ticker-items {
  display: inline-flex;
  padding: 0;
  animation: ticker-scroll 60s linear infinite;
  white-space: nowrap;
  will-change: transform;
  transform: translateX(0);
}

/* Pause animation on hover */
.forex-ticker-wrapper:hover .forex-ticker-items {
  animation-play-state: paused;
}

/* Scrolling animation */
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Individual ticker item */
.forex-ticker-item {
  background-color: #fff;
  border: 1px solid #e9ecef;
  padding: 8px;	
  min-width: 220px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: inline-block;
  cursor: grab;
}

/* Grid layouts */
.forex-ticker-item-header,
.forex-ticker-item-values {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 5px;
  line-height: 1.6;
  text-align: center;
}

.forex-ticker-item-header {
  font-size: 9px;
  text-transform: uppercase;
  color: #6c757d;
  font-weight: 600;
}

/* Symbol and values styling */
.forex-symbol {
  font-weight: 600;
  font-size: 10px;
}

.forex-bid, 
.forex-ask {
  font-family: "SF Mono", "Roboto Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.forex-spread {
  font-size: 10px;
  color: #555;
}

/* Direction indicators */
.forex-direction-up .forex-bid,
.forex-direction-up .forex-ask {
  color: #39b54a;
}

.forex-direction-down .forex-bid,
.forex-direction-down .forex-ask {
  color: #e74c3c;
}

/* Value change highlight */
.forex-value-changed {
  background-color: rgba(254, 202, 87, 0.4);
  transition: 0.3s ease all;
}

/* For continuous scrolling */
.forex-ticker-items-duplicate {
  display: inline-flex;
  padding: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .forex-ticker-item {
    min-width: 220px;
    padding: 8px;
  }

  .forex-ticker-item-header,
  .forex-ticker-item-values {
    gap: 10px;
  }
}

@media (max-width: 576px) {
  .forex-ticker-header {
    padding: 10px 12px;
  }
  
  .forex-ticker-title {
    font-size: 16px;
  }
} 