/* ============================================================================
   MARQUEE - Premium ads, testimonials, competitions, notices
   ============================================================================
   
   CRITICAL SPECIFICATIONS:
   
   1. .marquee MUST have padding: 0 (no margins/padding)
   2. .marquee MUST have border-radius: 0px (no rounded corners)
   3. Height MUST span from header base to viewport bottom
   4. .marquee-slide-info displays FOUR lines from post cards:
      - Title line (.marquee-slide-info-title)
      - Category line (.marquee-slide-info-cat) with subcategory icon
      - Location line (.marquee-slide-info-loc) with 📍 badge
      - Date line (.marquee-slide-info-date) with 📅 badge
   
   These specifications ensure the marquee displays edge-to-edge with
   complete event information matching the post card structure.
   
   ========================================================================== */

/* ============================================================================
   MARQUEE BASE (outer container)
   ============================================================================ */

.marquee {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: calc(var(--vh, 1vh) * 100);
  background: transparent;
  display: none;
  z-index: var(--layer-marquee);
  pointer-events: none;
}

/* Media Query to show only on large screens (1900px+) */
@media (min-width: 1900px) {
  .marquee--show {
    display: block;
  }
}

/* ============================================================================
   MARQUEE CONTENT (inner container)
   ============================================================================ */

.marquee-content {
  position: absolute;
  top: calc(var(--header-h) + var(--safe-top));
  bottom: auto;
  right: 0;
  width: var(--panel-w, 440px);
  padding: 0;
  background: rgba(0, 0, 0, 0.7);
  pointer-events: auto;
  z-index: 2;
  transform: translateX(100%);
  /* PANEL LAYER ANIMATION — driven by the PANEL LAYER FUNCTIONS LIST (index.js
     screenlayerOpen/screenlayerClose). Never animate this layer directly or add a
     competing transition here; all open/close animation control lives THERE. */
  transition: transform var(--panel-transition-duration, 0.3s) ease;
  will-change: transform;
  height: var(--panel-area-height, calc((var(--vh, 1vh) * 100) - var(--header-h) - var(--safe-top) - var(--footer-h)));
  max-height: var(--panel-area-height, calc((var(--vh, 1vh) * 100) - var(--header-h) - var(--safe-top) - var(--footer-h)));
  min-height: var(--panel-area-height, calc((var(--vh, 1vh) * 100) - var(--header-h) - var(--safe-top) - var(--footer-h)));
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 0px;
}

.marquee-content--hidden {
  pointer-events: none;
}

.marquee-content--visible {
  pointer-events: auto;
  transform: translateX(0);
}

/* ============================================================================
   MARQUEE SLIDE
   ============================================================================ */

.marquee-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  cursor: pointer;
  box-sizing: border-box;
}

.marquee-slide--active {
  opacity: 1;
}

/* ============================================================================
   MARQUEE SLIDE IMAGE
   ============================================================================ */

.marquee-slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: marquee-zoom 20s linear forwards;
}

@keyframes marquee-zoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}

/* ============================================================================
   MARQUEE SLIDE INFO
   ============================================================================ */

.marquee-slide-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 12px 10px 10px;
  text-shadow: 0 0 4px #000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  font-size: 13px;
  box-sizing: border-box;
  z-index: 10;
}

/* Info Lines - Title, Category, Location, Date */
/* Font sizes match postcards: title 16px bold, info rows 13px */
.marquee-slide-info-line {
  display: flex;
  align-items: center;
  margin-bottom: 6px; /* 6px Rule: Info rows in postcards/marquee use 6px spacing */
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.marquee-slide-info-title {
  display: flex;
  align-items: center;
  margin-bottom: 12px; /* 12px margin below title before info rows */
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.marquee-slide-info-cat {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.marquee-slide-info-loc {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.marquee-slide-info-date {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.marquee-slide-info-price {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Text inside marquee info rows truncates */
.marquee-slide-info-title > span,
.marquee-slide-info-cat > span:not(.marquee-slide-icon-sub),
.marquee-slide-info-loc > span,
.marquee-slide-info-date > span,
.marquee-slide-info-price > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Badge - fixed width column for icon alignment, 18px icon centered (matches postcards) */
.marquee-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 24px; /* Fixed width column for icon alignment */
  width: 24px;
  height: 18px;
  padding-right: 5px;
  border: 0;
  border-radius: 0;
  line-height: 1;
  box-sizing: border-box;
}

.marquee-image-badge {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

/* Promo tag for marquee slides (shown in price row, right-aligned) */
.marquee-tag-promo {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  margin-left: auto;
  background: var(--green-600);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 3px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ============================================================================
   SUBCATEGORY ICON
   ============================================================================ */

.marquee-slide-icon-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px; /* Fixed width column for icon alignment (matches postcards) */
  width: 24px;
  padding-right: 5px;
  box-sizing: border-box;
}

.marquee-image-sub {
  width: 18px;
  height: 18px;
  display: block;
}
