/* ==========================================================================
   HAMCO Sports News - Breaking News Ticker
   Red banner with flashing label and marquee scrolling headlines
   ========================================================================== */

/* ---- Breaking News Bar ---- */
.hn-breaking-news {
  background-color: var(--hn-red);
  color: var(--hn-white);
  height: var(--hn-breaking-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  z-index: var(--hn-z-breaking);
}

.hn-breaking-news.is-hidden {
  display: none;
}

/* ---- Inner Container ---- */
.hn-breaking-news-inner {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* ---- Breaking Label ---- */
.hn-breaking-news-label {
  display: flex;
  align-items: center;
  gap: var(--hn-space-2);
  flex-shrink: 0;
  font-family: var(--hn-font-ui);
  font-size: var(--hn-text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hn-white);
  background-color: rgba(0, 0, 0, 0.3);
  padding: 0 var(--hn-space-5);
  height: 100%;
  white-space: nowrap;
  z-index: 2;
}

.hn-breaking-news-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--hn-white);
  border-radius: 50%;
  animation: hn-breaking-flash 1s ease-in-out infinite;
}

/* ---- Marquee Area ---- */
.hn-breaking-news-marquee {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hn-breaking-track {
  display: flex;
  align-items: center;
  gap: var(--hn-space-10);
  white-space: nowrap;
  animation: hn-marquee-scroll 30s linear infinite;
  padding-left: var(--hn-space-6);
}

.hn-breaking-news-marquee:hover .hn-breaking-track,
.hn-breaking-track.is-paused {
  animation-play-state: paused;
}

.hn-breaking-news-item {
  display: inline-flex;
  align-items: center;
  gap: var(--hn-space-3);
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity var(--hn-transition-fast);
}

.hn-breaking-news-item:hover {
  opacity: 0.85;
}

.hn-breaking-news-title {
  font-family: var(--hn-font-ui);
  font-size: var(--hn-text-sm);
  font-weight: 600;
  color: var(--hn-white);
  white-space: nowrap;
}

.hn-breaking-news-separator {
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  flex-shrink: 0;
}

.hn-breaking-news-time {
  font-family: var(--hn-font-ui);
  font-size: var(--hn-text-xs);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

/* ---- Close Button ---- */
.hn-breaking-news-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hn-breaking-height);
  height: var(--hn-breaking-height);
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--hn-transition-fast), background-color var(--hn-transition-fast);
  z-index: 2;
}

.hn-breaking-news-close:hover {
  color: var(--hn-white);
  background-color: rgba(0, 0, 0, 0.2);
}

.hn-breaking-news-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ---- Marquee Fade Edges ---- */
.hn-breaking-news-marquee::before,
.hn-breaking-news-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 1;
  pointer-events: none;
}

.hn-breaking-news-marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--hn-red), transparent);
}

.hn-breaking-news-marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--hn-red), transparent);
}

/* ---- Animations ---- */
@keyframes hn-breaking-flash {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

@keyframes hn-marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .hn-breaking-news {
    height: 36px;
  }

  .hn-breaking-news-label {
    font-size: 10px;
    padding: 0 var(--hn-space-3);
    letter-spacing: 0.08em;
  }

  .hn-breaking-news-title {
    font-size: var(--hn-text-xs);
  }

  .hn-breaking-news-time {
    display: none;
  }

  .hn-breaking-news-close {
    width: 36px;
    height: 36px;
  }

  .hn-breaking-track {
    gap: var(--hn-space-8);
    animation-duration: 20s;
  }
}

@media (max-width: 480px) {
  .hn-breaking-news-dot {
    display: none;
  }

  .hn-breaking-news-marquee::before,
  .hn-breaking-news-marquee::after {
    width: 20px;
  }

  .hn-breaking-track {
    animation-duration: 25s;
  }
}
