/* ==========================================================================
   COUNTDOWN TIMER COMPONENT - EUROVISION 2027 BURGAS
   ========================================================================== */

/* Floating Overlay Container on Top of Hero */
.hero-countdown-glass-overlay {
  position: absolute;
  top: 1.15rem;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 0 1.25rem;
  pointer-events: none;
}

/* Apple Liquid Glass Floating Capsule (Strict Single Line) */
.hero-countdown-strip.liquid-glass {
  pointer-events: auto;
  width: 100%;
  max-width: 980px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-full);
  padding: 0.42rem clamp(0.75rem, 2vw, 1.4rem);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.35rem, 1.2vw, 1rem);
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 30px rgba(7, 17, 63, 0.12);
  white-space: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0;
  transition: all var(--transition-fast);
}

.hero-countdown-strip.liquid-glass::-webkit-scrollbar {
  display: none;
}

.hero-countdown-strip.liquid-glass:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.95),
    0 14px 38px rgba(7, 17, 63, 0.16);
}

.hero-countdown-strip.liquid-glass .strip-num {
  color: #07113f;
}

.hero-countdown-strip.liquid-glass .strip-title {
  color: #0f172a;
}

.strip-left {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: clamp(0.68rem, 0.6rem + 0.3vw, 0.78rem);
  font-family: var(--font-family-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.strip-title strong {
  color: var(--euro-accent-start);
  font-weight: 800;
}

.strip-countdown {
  display: inline-flex;
  align-items: baseline;
  gap: clamp(0.15rem, 0.4vw, 0.35rem);
  font-family: var(--font-family-display);
  white-space: nowrap;
  flex-shrink: 0;
}

.strip-unit {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  white-space: nowrap;
}

.strip-num {
  font-size: clamp(1.05rem, 0.95rem + 0.8vw, 1.45rem);
  font-weight: 800;
  color: var(--text-main);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.strip-label {
  font-size: clamp(0.58rem, 0.52rem + 0.2vw, 0.7rem);
  font-family: var(--font-family-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

.strip-colon {
  font-size: clamp(0.85rem, 0.78rem + 0.4vw, 1.1rem);
  color: var(--euro-accent-start);
  font-weight: 700;
  opacity: 0.75;
}

.strip-right {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.3rem, 0.7vw, 0.6rem);
  white-space: nowrap;
  flex-shrink: 0;
}

.strip-tz-text {
  font-size: clamp(0.65rem, 0.58rem + 0.2vw, 0.75rem);
  color: var(--text-dim);
  font-family: var(--font-family-mono);
}

/* Liquid Glass Interactive Controls */
.hero-countdown-strip.liquid-glass .tz-pill {
  background: rgba(7, 17, 63, 0.07);
  border: 1px solid rgba(7, 17, 63, 0.14);
  color: var(--text-main);
  backdrop-filter: blur(8px);
}

.hero-countdown-strip.liquid-glass .tz-pill.active {
  background: var(--euro-accent-start);
  border-color: var(--euro-accent-start);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(210, 13, 85, 0.35);
}

.hero-countdown-strip.liquid-glass .btn-cal-strip {
  background: var(--euro-accent-end);
  border: 1px solid var(--euro-accent-end);
  color: #ffffff;
  backdrop-filter: blur(8px);
  padding: 0.22rem clamp(0.4rem, 0.8vw, 0.65rem);
  border-radius: var(--radius-full);
  font-size: clamp(0.65rem, 0.58rem + 0.2vw, 0.72rem);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.hero-countdown-strip.liquid-glass .btn-cal-strip:hover {
  background: var(--euro-accent-start);
  border-color: var(--euro-accent-start);
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 640px) {
  .hero-countdown-glass-overlay {
    top: 0.5rem;
    padding: 0 0.5rem;
  }
  
  .hero-countdown-strip.liquid-glass {
    border-radius: var(--radius-md);
    padding: 0.35rem 0.65rem;
    gap: 0.35rem;
    justify-content: center;
    max-width: calc(100vw - 1rem);
  }

  .hero-countdown-strip.liquid-glass .strip-left {
    display: none;
  }

  /* The pills are a control and there is no room for them here; the start
     time itself is information, so it stays. The strip wraps to a second line
     rather than scrolling sideways. */
  .hero-countdown-strip.liquid-glass .tz-pills-strip {
    display: none;
  }

  .hero-countdown-strip.liquid-glass {
    flex-wrap: wrap !important;
  }

  .hero-countdown-strip.liquid-glass .strip-tz-text {
    flex-basis: 100%;
    text-align: center;
    font-size: 0.6rem;
  }

  .hero-carousel-dots {
    bottom: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Page-Wide Hero Stage Container with 5-Second Crossfade Carousel */
.hero-stage-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  border-top: none;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  aspect-ratio: 16 / 9;
}

@media (max-width: 1024px) {
  .hero-stage-container {
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 600px) {
  .hero-stage-container {
    aspect-ratio: 9 / 16;
  }
}

.hero-slides-wrapper {
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: auto;
  width: 100%;
  position: relative;
}

.hero-slide {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.hero-stage-picture {
  display: block;
  width: 100%;
}

.hero-stage-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  vertical-align: middle;
}

/* Subtle Hero Slide Indicator Dots */
.hero-carousel-dots,
.hero-carousel-indicators {
  position: absolute;
  bottom: 1.25rem;
  right: 1.5rem;
  display: flex;
  /* 14px between 12px dots gives 26px centre-to-centre, so the 24px hit areas
     below clear each other by 2px instead of overlapping by 31px. */
  gap: 0.875rem;
  z-index: 5;
  background: rgba(7, 17, 63, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.hero-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 24px;
  min-height: 24px;
}

/* The global focus ring computes to 1.4:1 against the hero glass, which is
   invisible. SC 1.4.11 needs 3:1; white on the hero is 18:1. */
.hero-dot:focus-visible,
.hero-carousel-toggle:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.85);
}

.hero-dot.active {
  background: var(--euro-accent-start);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(210, 13, 85, 0.8);
}

@media (max-width: 480px) {
  .hero-stage-container {
    border-radius: var(--radius-md);
  }
}

.countdown-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.countdown-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--euro-spectrum);
}

.countdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.countdown-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-indicator {
  width: 9px;
  height: 9px;
  background-color: var(--euro-accent-start);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px rgba(210, 13, 85, 0.7);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px rgba(210, 13, 85, 0.8); }
  50% { opacity: 0.45; transform: scale(0.85); box-shadow: 0 0 4px rgba(210, 13, 85, 0.3); }
}

/* Timezone Selector Pills */
.timezone-pills {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 2px;
}

.tz-pill {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-family-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  min-height: 32px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.tz-pill::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}

.tz-pill:hover {
  color: var(--text-main);
}

.tz-pill.active {
  background: var(--euro-spectrum);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xs);
}

@media (min-width: 480px) {
  .countdown-grid {
    gap: var(--space-sm);
  }
}

.countdown-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.countdown-box:hover {
  border-color: rgba(210, 13, 85, 0.4);
  transform: translateY(-1px);
}

.countdown-num {
  font-family: var(--font-family-display);
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
  letter-spacing: -0.04em;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-family: var(--font-family-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 0.4rem;
}

.countdown-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: var(--font-size-xs);
  color: var(--text-dim);
}

.countdown-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-cal-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.btn-cal-action:hover {
  border-color: var(--euro-accent-start);
  background: var(--bg-surface-elevated);
  color: var(--euro-accent-start);
  text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-countdown-overlay {
    bottom: var(--space-sm);
    width: calc(100% - var(--space-md));
  }
  
  .countdown-card.countdown-card-hero {
    padding: var(--space-md) var(--space-sm);
  }
  
  .countdown-card.countdown-card-hero .countdown-num {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-stage-container {
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
  }
  
  .countdown-card.countdown-card-hero {
    padding: var(--space-sm) 0.4rem;
  }
  
  .countdown-card.countdown-card-hero .countdown-header {
    margin-bottom: var(--space-xs);
  }
  
  .countdown-card.countdown-card-hero .countdown-footer {
    margin-top: var(--space-xs);
    padding-top: var(--space-xs);
  }
}

/* Accessibility Live Region (Strictly Screen-Reader Only, Zero Visual Footprint) */
#countdown-live-region,
.hero-countdown-strip .sr-only,
.hero-countdown-glass-overlay .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none !important;
}


