/* ===============================
   Sponsor Overlay Styling (v3.8)
   =============================== */

/* === Shared container === */
#sponsor-widget {
  position: fixed;              /* pinned to viewport, not scrolled */
  top: 15px;
  left: 15px;
  width: 200px;                 /* 200x100 core image */
  height: 100px;
  z-index: 1000;
  transition: transform 0.4s ease-in-out, opacity 0.3s ease-in-out;
}

#sponsor-widget.hidden {
  display: none !important;
}

#sponsor-widget.collapsed {
  transform: translateX(-85%);  /* slides mostly off-screen */
}
/* ▶ always visible when sponsor is collapsed (desktop + mobile) */
#sponsor-widget.collapsed .sponsor-toggle {
  display: flex !important;
}
#sponsor-widget .sponsor-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

/* === Image === */
#sponsor-widget img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.45);
  border: none;                 /* remove faint outline */
}

/* === Controls (X + ▶) === */
#sponsor-widget .sponsor-close,
#sponsor-widget .sponsor-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 14px;
  padding: 4px 6px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  border: none;
}

/* X button on right corner, compact */
#sponsor-widget .sponsor-close {
  right: 0;
  border-radius: 4px 0 0 4px;
  width: auto;
  height: auto;
}

/* ▶ button appears on left edge when collapsed */
#sponsor-widget .sponsor-toggle {
  left: 100%;
  border-radius: 0 4px 4px 0;
  display: none; /* JS shows after collapse */
}

/* 💰 toggle button bottom-left */
#sponsor-toggle-btn {
  position: fixed;
  bottom: 15px;
  left: 15px;
  z-index: 1002;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  padding: 6px 10px;
  cursor: pointer;
  display: none;
  transition: opacity 0.3s ease-in-out;
}

#sponsor-toggle-btn.hidden {
  display: none !important;
}

#sponsor-toggle-btn:not(.hidden) {
  display: block;
  opacity: 1;
}

#sponsor-toggle-btn:hover {
  opacity: 0.8;
}

/* === MOBILE OPTIMIZATION === */
@media (max-width: 768px) {
  #sponsor-widget {
    width: 160px;          /* compact */
    height: 80px;
    top: 10px;
    left: 10px;
  }

  #sponsor-widget .sponsor-close,
  #sponsor-widget .sponsor-toggle {
    position: absolute;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    text-align: center;
    width: 26px;            /* fixed circle size */
    height: 26px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  /* ✕ in top-right corner */
  #sponsor-widget .sponsor-close {
    top: 4px;
    right: 4px;
    transform: none;
  }

  /* ▶ shows when collapsed; make sure it's visible and touchable */
  #sponsor-widget.collapsed .sponsor-toggle {
  display: flex !important;
  }

  #sponsor-widget .sponsor-toggle {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    font-size: 18px;
    border-radius: 0 14px 14px 0;
  }

  #sponsor-widget img {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  }
}


/* ==============================================
   BILLBOARD LIST MODAL (stand-alone styling)
   ============================================== */
.billboard-modal {
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  background: rgba(15,15,15,0.96);
  color: #fff;
  border-radius: 12px;
  padding: 15px 20px;
  z-index: 2000;
  box-shadow: 0 0 15px rgba(0,0,0,0.7);
  animation: billboardFadeIn 0.3s ease-out;
}

@keyframes billboardFadeIn {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to   { transform: translate(-50%, 0);   opacity: 1; }
}

.billboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
  margin-bottom: 10px;
}

.billboard-title {
  font-size: 1.2em;
  font-weight: 600;
}

.billboard-close {
  cursor: pointer;
  font-size: 1.2em;
  padding: 4px 8px;
}

.billboard-scroll {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 10px;
}

.billboard-item {
  border-bottom: 1px solid #333;
  padding: 10px 0;
}

.billboard-item:last-child {
  border-bottom: none;
}

.billboard-item h3 {
  font-size: 1.05em;
  margin-bottom: 4px;
}

.billboard-item p {
  font-size: 0.9em;
  color: #ccc;
  margin-bottom: 6px;
}

.billboard-cta {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(90deg, #f90, #c60);
  color: #000;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.billboard-cta:hover {
  background: linear-gradient(90deg, #ffb84d, #e67300);
}

@media (max-width: 768px) {
  .billboard-modal {
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
   /* width: 100%;
    height: 85%;*/
    border-radius: 15px 15px 0 0;
  }
}
/* ==============================================
   toggle  (stand-alone styling)
   ============================================== */
#promoToggleRow {
  position: fixed;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
  z-index: 1200;
}

.promo-toggle {
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 1px solid #555;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.promo-toggle:hover {
  background: rgba(255,165,0,0.85);
  color: #000;
}

.promo-toggle.hidden {
  display: none !important;
}
#sponsor-toggle-btn {
  margin-bottom: 48px; /* keeps it above the promo row if overlapping */
}
/* ==============================================
   BILLBOARD SINGLE IMAGE SIZE CORRECTION
   ============================================== */

/* Fullscreen backdrop stays same, only inner box changes */
.billboard-modal.single {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.8);
}

/* Centered content box for billboard image */
.billboard-content.single {
  width: auto;
  max-width: 820px;   /* match your desktop 800px graphic */
  height: auto;
  max-height: 90vh;   /* ensures no overflow on small screens */
  padding: 15px;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
  text-align: center;
}

/* Image now locks to natural aspect ratio */
.billboard-main-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Close button placement */
.billboard-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.6em;
  color: #fff;
  cursor: pointer;
  background: rgba(0,0,0,0.4);
  padding: 4px 8px;
  border-radius: 6px;
}

/* ==============================================
   FINAL MOBILE BILLBOARD SCALING FIX
   ============================================== */
@media (max-width: 480px) {
  .billboard-modal.single {
    align-items: flex-end;
    justify-content: center;
    background: rgba(0,0,0,0.85);
  }

  .billboard-content.single {
    position: relative;
    width: 90%;
    max-width: 360px;
    background: #000;
    border-radius: 10px 10px 0 0;
    padding: 8px;
    box-shadow: 0 0 12px rgba(0,0,0,0.7);
    margin-bottom: env(safe-area-inset-bottom, 10px);
    text-align: center;
    /* 👇 keep height proportional to image */
    aspect-ratio: 2 / 1;        /* roughly 800×400 ratio */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .billboard-main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 45vh;           /* ensure fits on smallest screens */
    object-fit: contain;
  }

  .billboard-subtext {
    font-size: 0.8em;
    margin: 4px 0;
    color: #ccc;
  }

  .billboard-cta {
    display: inline-block;
    padding: 5px 9px;
    font-size: 0.85em;
    background: linear-gradient(90deg, #f90, #c60);
    color: #000;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 4px;
  }

  .billboard-close {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 1.2em;
    color: #fff;
    background: rgba(0,0,0,0.4);
    padding: 3px 7px;
    border-radius: 6px;
  }
}
/* ==============================================
   MOBILE BILLBOARD LIST (bottom-sheet style)
   ============================================== */
@media (max-width: 768px) {
  .billboard-modal.list {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 85%;
    max-height: 85vh;           /* never taller than viewport */
    background: rgba(10,10,10,0.95);
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
    z-index: 2000;
  }

  .billboard-content.list {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    overflow: hidden;
  }

  .billboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    margin-bottom: 8px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
  }

  .billboard-title {
    font-size: 1em;
    font-weight: 600;
  }

  .billboard-close {
    cursor: pointer;
    font-size: 1.2em;
    background: rgba(0,0,0,0.5);
    border-radius: 6px;
    padding: 4px 8px;
    margin-left: 8px;
  }

  .billboard-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 6px;
  }

  .billboard-item {
    border-bottom: 1px solid #333;
    padding: 10px 0;
  }

  .billboard-item h3 {
    font-size: 0.9em;
    margin-bottom: 4px;
  }

  .billboard-item p {
    font-size: 0.8em;
    color: #ccc;
    margin-bottom: 6px;
  }

  .billboard-cta {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.85em;
    background: linear-gradient(90deg, #f90, #c60);
    color: #000;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
  }

  @keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
}
/* ==============================================
   Pill styled Spotlight sales css
   ============================================== */
#spotlight-pill {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,20,20,0.85);
  color: #fff;
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 14px;
  z-index: 900;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: center;
  line-height: 1.3;
  animation: fadeIn 0.4s ease;
}

#spotlight-pill a {
  color: #ffd700;
  text-decoration: none;
  font-weight: 600;
}

#spotlight-pill .close {
  margin-left: 6px;
  cursor: pointer;
  opacity: 0.7;
}
#spotlight-pill .spotlight-cta {
  background: #ffd700;
  color: #000;
  font-weight: 600;
  border-radius: 14px;
  padding: 3px 8px;
  margin-left: 6px;
  text-decoration: none;
  transition: background 0.2s ease;
  white-space: nowrap;
}
#spotlight-pill .spotlight-cta:hover {
  background: #ffe44c;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
