/* ============================
   🕒 Time Ribbon — Ultra Smooth (Chrome + GPU Optimized)
============================ */

/* Container */
.time-ribbon {
  width: 100%;
  background-color: #f9f9f9;
  color: #000;
  overflow-x: hidden;
  z-index: 1;
  font-size: 14px;
  padding: 6px 0;
  display: flex;
  align-items: center;
  line-height: 1.4;
  perspective: 1000px;
  transform: translateZ(0);            /* ✅ force GPU layer */
  backface-visibility: hidden;
}

/* Inner Wrapper */
.ribbon-inner {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
  transform: translateZ(0);
}

/* Scrolling Track */
.ribbon-track {
  display: inline-block;
  white-space: nowrap;
  animation: scroll 240s linear infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  translate: 0;                        /* ✅ avoid subpixel snapping */
  contain: paint layout;
}

/* Keyframes — Use translateX for smoother GPU pipeline */
@keyframes scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Pause on hover */
.time-ribbon:hover .ribbon-track {
  animation-play-state: paused;
}

/* Each ribbon item (City + Time pair) */
/* 🔄 UPDATED: old + new styles merged */
.ribbon-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;                           /* space between flag / text */
  font-family: 'Roboto Mono', monospace;
  font-weight: 500;
  margin-right: 60px;
  line-height: 1.2;
  padding: 4px 10px;                  /* pill padding */
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;               /* pill shape */
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Time text */
.ribbon-item .time {
  font-weight: 700;
  color: #007bff;
  min-width: 70px;
  text-align: right;
  contain: layout style paint;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  flex-shrink: 0;
}

/* City text (if you use span.city separately) */
.ribbon-item .city {
  font-weight: 500;
  color: inherit;
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 🏳 Flag icons */
.flag-icon {
  width: 20px;
  height: 14px;
  object-fit: cover;
  margin-right: 2px;
  vertical-align: middle;
  border-radius: 2px;
}

/* Dark mode */
body.dark-mode .time-ribbon {
  background-color: #000;
  color: #fff;
}

body.dark-mode .ribbon-item .time {
  color: #00ffcc;
}
