/**
 * Ticker Bar Component
 * Non-invasive rotating ad/sponsor banner
 * Fits PropPilot cockpit aesthetic
 */

.ticker-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(90deg, rgba(13, 92, 99, 0.98) 0%, rgba(17, 122, 132, 0.98) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1a7a85;
  z-index: 9999;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-family: 'Satoshi', -apple-system, sans-serif;
  font-size: 14px;
  color: #e5e5e5;
}

.ticker-bar.position-bottom {
  top: auto;
  bottom: 0;
  border-bottom: none;
  border-top: 1px solid #1a7a85;
}

.ticker-bar-content {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
  padding-left: 100%;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.ticker-bar:hover .ticker-bar-content {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 40px;
  color: #e5e5e5;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ticker-item:hover {
  color: #f5a623;
  text-shadow: 0 0 8px rgba(245, 166, 35, 0.3);
}

.ticker-item.clickable {
  cursor: pointer;
}

.ticker-sponsor-logo {
  height: 20px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.ticker-item:hover .ticker-sponsor-logo {
  filter: brightness(1) invert(0);
  opacity: 1;
}

.ticker-separator {
  display: inline-block;
  width: 3px;
  height: 3px;
  background: #f5a623;
  border-radius: 50%;
  margin: 0 20px;
}

.ticker-close-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  font-size: 16px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.ticker-close-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  border-color: #ef4444;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .ticker-bar {
    height: 32px;
    font-size: 13px;
  }

  .ticker-item {
    padding: 0 24px;
  }

  .ticker-separator {
    margin: 0 12px;
  }

  .ticker-sponsor-logo {
    height: 16px;
  }
}

/* When ticker is at top, offset other content */
body.has-ticker-top {
  padding-top: 36px;
}

body.has-ticker-bottom {
  padding-bottom: 36px;
}

/* Slide in animation */
.ticker-bar.ticker-enter {
  animation: ticker-slide-in 0.4s ease-out;
}

@keyframes ticker-slide-in {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ticker-bar.position-bottom.ticker-enter {
  animation: ticker-slide-in-bottom 0.4s ease-out;
}

@keyframes ticker-slide-in-bottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
