/**
 * Affiliate Banner - Scrolling Ticker Strip
 * Full-width animated banner between games grid and footer.
 * Scrolls right → left on an infinite seamless loop.
 */

/* ==========================================================================
   Wrapper
   ========================================================================== */
.affiliate-banner-section {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

.affiliate-banner-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #64748b;
}

.affiliate-banner-label::before,
.affiliate-banner-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

/* ==========================================================================
   Scrolling Track
   ========================================================================== */
.affiliate-track-outer {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(135deg, rgba(10, 14, 23, 0.95), rgba(15, 23, 42, 0.85));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1px 0;
}

/* Fade edge masks */
.affiliate-track-outer::before,
.affiliate-track-outer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.affiliate-track-outer::before {
  left: 0;
  background: linear-gradient(90deg, rgba(10, 14, 23, 1) 0%, transparent 100%);
}

.affiliate-track-outer::after {
  right: 0;
  background: linear-gradient(270deg, rgba(10, 14, 23, 1) 0%, transparent 100%);
}

.affiliate-track {
  display: flex;
  align-items: stretch;
  gap: 0;
  animation: affiliateScroll 28s linear infinite;
  width: max-content;
  will-change: transform;
}

.affiliate-track:hover {
  animation-play-state: paused;
}

@keyframes affiliateScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Individual Affiliate Card
   ========================================================================== */
.affiliate-card {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 1.6rem;
  cursor: pointer;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.25s ease;
  min-width: 320px;
  position: relative;
  flex-shrink: 0;
}

.affiliate-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.affiliate-card:hover .affiliate-card-logo-wrap {
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.4), 0 0 40px rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.5);
}

.affiliate-card:hover .affiliate-cta-badge {
  background: rgba(251, 191, 36, 0.25);
  border-color: rgba(251, 191, 36, 0.7);
  color: #fde68a;
}

/* Logo container */
.affiliate-card-logo-wrap {
  flex-shrink: 0;
  width: 68px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.affiliate-card-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Info block */
.affiliate-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.affiliate-card-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.affiliate-card-bonus {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.95rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #fde68a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.affiliate-bonus-icon {
  font-size: 0.85rem;
  -webkit-text-fill-color: initial;
}

.affiliate-card-promo-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.affiliate-card-promo-label {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.affiliate-card-promo-code {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 5px;
  padding: 0.1rem 0.4rem;
  letter-spacing: 0.5px;
}

/* CTA badge */
.affiliate-cta-badge {
  flex-shrink: 0;
  margin-left: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
  white-space: nowrap;
  transition: all 0.25s ease;
}

/* Separator between repeating sets */
.affiliate-separator {
  display: inline-flex;
  align-items: center;
  padding: 0 1.5rem;
  color: rgba(255, 255, 255, 0.15);
  font-size: 1.2rem;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

/* Sponsored badge label */
.affiliate-sponsored-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #92400e;
  color: rgba(251, 191, 36, 0.6);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Pulse dot on bonus badge */
@keyframes bonusPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.affiliate-live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fbbf24;
  animation: bonusPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
  .affiliate-banner-section {
    padding: 0 0.75rem;
    margin-bottom: 1.5rem;
  }
  .affiliate-card {
    min-width: 270px;
    padding: 0.85rem 1.2rem;
    gap: 0.85rem;
  }
  .affiliate-cta-badge {
    display: none;
  }
  .affiliate-track {
    animation-duration: 22s;
  }
}

/* ==========================================================================
   Side Skyscraper Gutter Banners (Left & Right Flankers - Only in /soccer)
   ========================================================================== */
.affiliate-gutter-banner {
  display: none !important;
  position: fixed;
  top: 95px;
  width: 175px;
  z-index: 90;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: linear-gradient(180deg, rgba(13, 20, 36, 0.98) 0%, rgba(20, 30, 55, 0.98) 100%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65), 0 0 26px rgba(37, 99, 235, 0.25);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  user-select: none;
}

/* Side banners ONLY appear when actively inside soccer view */
body.inside-soccer .affiliate-gutter-banner {
  display: block !important;
}

/* Strictly remove side gutter banners from Crazy Time & Lobby */
body.inside-crazytime .affiliate-gutter-banner,
body:not(.inside-soccer) .affiliate-gutter-banner,
body:has(#trackerView[style*="display: block"]) .affiliate-gutter-banner,
#trackerView:not([style*="display: none"]) ~ .affiliate-gutter-banner {
  display: none !important;
}

.affiliate-gutter-banner:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(96, 165, 250, 0.75);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 35px rgba(59, 130, 246, 0.45);
}

.affiliate-gutter-banner.gutter-left {
  left: 14px;
}

.affiliate-gutter-banner.gutter-right {
  right: 14px;
}

.aff-gutter-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.35rem 0.95rem 1.25rem;
  color: inherit;
  text-decoration: none;
  gap: 0.9rem;
}

.aff-gutter-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.aff-gutter-logo {
  width: 78px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.6));
}

.aff-gutter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.aff-gutter-bonus-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.18), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 0.75rem 0.5rem;
  width: 100%;
}

.aff-gutter-super {
  font-size: 0.68rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.aff-gutter-amount {
  font-size: 1.65rem;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 0 14px rgba(234, 179, 8, 0.6);
  line-height: 1.15;
  margin: 0.15rem 0;
}

.aff-gutter-bonus-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  margin-top: 0.15rem;
}

.aff-gutter-code-box {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed rgba(96, 165, 250, 0.5);
  border-radius: 10px;
  padding: 0.5rem 0.35rem;
}

.aff-gutter-code-lbl {
  font-size: 0.64rem;
  font-weight: 800;
  color: #94a3b8;
  display: block;
  letter-spacing: 0.5px;
}

.aff-gutter-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
}

.aff-gutter-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid rgba(96, 165, 250, 0.6);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
  transition: all 0.2s ease;
}

.aff-gutter-inner:hover .aff-gutter-cta {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.7);
  transform: translateY(-2px);
}

/* Hide on screens where side gutter space is too narrow */
@media (max-width: 1400px) {
  body.inside-soccer .affiliate-gutter-banner,
  .affiliate-gutter-banner {
    display: none !important;
  }
}

@media (min-width: 1680px) {
  .affiliate-gutter-banner {
    width: 195px;
  }
  .aff-gutter-logo {
    width: 88px;
    height: 54px;
  }
  .aff-gutter-amount {
    font-size: 1.85rem;
  }
}
