/* =====================================================
   BREAKING NEWS TICKER - Fixed Above Header
   Coding by: Rishi Riswan • +94 7799688469
   Always fixed at top, header below it
   ===================================================== */

.tn-ticker-wrap,
.tn-ticker-wrap * {
  box-sizing: border-box !important;
}

/* ========== FIXED AT TOP - Primary Color ========== */
.tn-ticker-wrap {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1001 !important;
  background: var(--primary-color, #e63946) !important;
  padding: 6px 0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.tn-ticker-wrap .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 12px !important;
}

/* ========== MAIN TICKER ========== */
.tn-ticker {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #ffffff !important;
}

/* ========== LABEL ========== */
.tn-ticker-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 12px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.tn-ticker-label:hover {
  background: rgba(255, 255, 255, 0.3) !important;
}

/* ========== ICON - Accent Color ========== */
.tn-ticker-icon {
  width: 18px !important;
  height: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 9px !important;
  border-radius: 50% !important;
  background: var(--accent-color, #f77f00) !important;
  color: #ffffff !important;
  animation: tnTickerBeat 1s ease-in-out infinite !important;
}

@keyframes tnTickerBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.tn-ticker-text-desktop {
  display: inline !important;
}

/* ========== TEXT WINDOW ========== */
.tn-ticker-window {
  position: relative !important;
  overflow: hidden !important;
  flex: 1 !important;
  min-height: 22px !important;
}

/* ========== EACH HEADLINE ========== */
.tn-ticker-item {
  position: absolute !important;
  inset: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  opacity: 0 !important;
  transform: translateY(100%) !important;
  transition: all 0.4s ease !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

.tn-ticker-item:hover {
  color: rgba(255, 255, 255, 0.85) !important;
}

.tn-ticker-item.tn-active {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.tn-ticker-item.tn-exit-up {
  opacity: 0 !important;
  transform: translateY(-100%) !important;
}

/* ========== TICKER ITEM ICON - Accent Color ========== */
.tn-ticker-item .ticker-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  background: var(--accent-color, #f77f00) !important;
  border-radius: 50% !important;
  font-size: 9px !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
}

.tn-ticker-item .ticker-text {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* ========== PROGRESS BAR ========== */
.tn-ticker-progress-track {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -2px !important;
  height: 2px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.3) !important;
  overflow: hidden !important;
}

.tn-ticker-progress-fill {
  width: 0% !important;
  height: 100% !important;
  background: #ffffff !important;
  border-radius: 999px !important;
  transition: width 0.1s linear !important;
}

.tn-ticker.paused .tn-ticker-progress-fill {
  background: var(--accent-color, #f77f00) !important;
}

.tn-ticker.paused .tn-ticker-icon {
  animation-play-state: paused !important;
}

/* ========== HIDE OLD TICKER BAR ========== */
.ticker-bar {
  display: none !important;
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 640px) {
  .tn-ticker-wrap {
    padding: 5px 0 !important;
  }
  
  .tn-ticker {
    gap: 8px !important;
  }
  
  .tn-ticker-label {
    padding: 4px 6px !important;
    gap: 0 !important;
  }
  
  .tn-ticker-text-desktop {
    display: none !important;
  }
  
  .tn-ticker-icon {
    width: 20px !important;
    height: 20px !important;
    font-size: 10px !important;
  }
  
  .tn-ticker-item {
    font-size: 11px !important;
    gap: 6px !important;
  }
  
  .tn-ticker-item .ticker-icon {
    width: 18px !important;
    height: 18px !important;
    font-size: 8px !important;
  }
  
  .tn-ticker-window {
    min-height: 20px !important;
  }
}

/* ========== RESPONSIVE - DESKTOP ========== */
@media (min-width: 769px) {
  .tn-ticker-wrap {
    padding: 7px 0 !important;
  }
  
  .tn-ticker-label {
    font-size: 11px !important;
    padding: 5px 14px !important;
  }
  
  .tn-ticker-item {
    font-size: 13px !important;
  }
  
  .tn-ticker-item .ticker-icon {
    width: 22px !important;
    height: 22px !important;
    font-size: 10px !important;
  }
}

/* ========== DARK MODE ========== */
[data-theme="dark"] .tn-ticker-wrap {
  background: #1a1a2e !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .tn-ticker-label {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}