/**
 * Spashtvani Breaking News Ticker Styles
 * Responsive • Accessible • Grounded in Spashtvani Design Tokens
 */

.sp-breaking-ticker {
  background-color: var(--sp-color-breaking, #C8102E);
  color: #FFFFFF;
  border-bottom: 2px solid rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 90;
  font-family: inherit;
}

.sp-breaking-ticker[hidden],
.sp-breaking-ticker__controls[hidden] {
  display: none !important;
}

.sp-breaking-ticker__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  min-height: 44px;
}

/* Pulsing Badge Indicator */
.sp-breaking-ticker__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(0, 0, 0, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 3px;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.sp-breaking-ticker__pulse {
  width: 8px;
  height: 8px;
  background-color: #FFEBEE;
  border-radius: 50%;
  display: inline-block;
  animation: sp-pulse 1.5s infinite ease-in-out;
}

@keyframes sp-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 6px #FFFFFF;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
}

/* Content & Rotating List */
.sp-breaking-ticker__content {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  min-height: 1.5rem;
}

.sp-breaking-ticker__list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.sp-breaking-ticker__item {
  display: none;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-breaking-ticker__item.is-active {
  display: block;
}

.sp-breaking-ticker__link {
  color: #FFFFFF;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.sp-breaking-ticker__link:hover {
  text-decoration: underline;
  opacity: 0.95;
}

.sp-breaking-ticker__link:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

/* Pause / Play Controls */
.sp-breaking-ticker__controls {
  flex-shrink: 0;
}

.sp-breaking-ticker__btn {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  min-width: 28px;
  min-height: 28px;
}

.sp-breaking-ticker__btn:hover {
  background: rgba(0, 0, 0, 0.4);
}

.sp-breaking-ticker__btn:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 1px;
}

/* Print Styles */
@media print {
  .sp-breaking-ticker {
    display: none !important;
  }
}
