/* News Ticker Container */
.eafe-news-ticker {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

/* Ticker Label */
.eafe-ticker-label {
  display: flex;
  align-items: center;
  background: #007cba;
  color: white;
  padding: 8px 15px;
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

.eafe-ticker-label i,
.eafe-ticker-label svg {
  margin-right: 8px;
}

.eafe-ticker-label svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Ticker Content */
.eafe-ticker-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Ticker Items */
.eafe-ticker-items {
  display: flex;
  align-items: center;
}

/* Horizontal Style */
.eafe-ticker-style-horizontal .eafe-ticker-items {
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}

/* Pause on hover only for ticker content */
.eafe-ticker-style-horizontal .eafe-ticker-content:hover .eafe-ticker-items {
  animation-play-state: paused;
}

/* Vertical Style */
.eafe-ticker-style-vertical .eafe-ticker-content {
  height: 40px;
}

.eafe-ticker-style-vertical .eafe-ticker-items {
  flex-direction: column;
  align-items: flex-start;
}

/* Fade Style */
.eafe-ticker-style-fade .eafe-ticker-content {
  height: 40px;
}

.eafe-ticker-style-fade .eafe-ticker-items {
  position: relative;
}

/* Ticker Item */
.eafe-ticker-item {
  display: flex;
  align-items: center;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 14px;
}

.eafe-ticker-item a {
  color: inherit;
  text-decoration: none;
}

.eafe-ticker-item a:hover {
  color: #007cba;
}

.eafe-ticker-item:hover {
  color: #007cba;
}

/* News Badge */
.eafe-news-badge {
  background: #dc3545;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  margin-right: 8px;
  text-transform: uppercase;
}

/* News Date */
.eafe-news-date {
  margin-left: 8px;
  font-size: 12px;
  color: #6c757d;
  opacity: 0.8;
}

/* Item Separator */
.eafe-ticker-separator {
  color: #6c757d;
  margin: 0 10px;
  opacity: 0.6;
}

/* Ticker Controls */
.eafe-ticker-controls {
  display: flex;
  align-items: center;
  padding: 0 10px;
  flex-shrink: 0;
  gap: 5px;
}

.eafe-ticker-controls button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: 0;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #666;
  min-width: 32px;
  min-height: 32px;
}

.eafe-ticker-controls button:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.eafe-ticker-controls button:active {
  transform: scale(0.95);
}

.eafe-ticker-controls svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

/* Ensure controls are always visible and clickable */
.eafe-ticker-controls .eafe-ticker-prev,
.eafe-ticker-controls .eafe-ticker-next,
.eafe-ticker-controls .eafe-ticker-pause-play {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Progress Bar */
.eafe-ticker-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: #007cba;
  transition: width linear;
}

/* Empty State */
.eafe-news-ticker-empty {
  padding: 15px;
  text-align: center;
  color: #6c757d;
  font-style: italic;
}

/* Horizontal Scroll Animation */
@keyframes ticker-scroll {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .eafe-ticker-style-horizontal .eafe-ticker-items {
    animation: none;
  }

  .eafe-ticker-item {
    transition: none;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .eafe-news-ticker {
    flex-direction: column;
  }

  .eafe-ticker-label {
    width: 100%;
    justify-content: center;
  }

  .eafe-ticker-content {
    width: 100%;
  }

  .eafe-ticker-controls {
    width: 100%;
    justify-content: center;
    padding: 8px 0;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .eafe-news-ticker {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
  }

  .eafe-ticker-item {
    color: #e2e8f0;
  }

  .eafe-ticker-item:hover {
    color: #63b3ed;
  }

  .eafe-news-date {
    color: #a0aec0;
  }

  .eafe-ticker-controls button:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* Focus States for Accessibility */
.eafe-ticker-controls button:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

.eafe-ticker-item a:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}
