/* Countdown Banner Styles */

/* Fixed banner at very top of page */
.countdown-banner-fixed {
  /* position: fixed !important; */
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 3px solid #dc3545;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 15px 20px;
  text-align: center;
  margin: 0 !important;
  z-index: 999999 !important;
  height: auto;
  min-height: 60px;
}

/* Shortcode banner for content areas */
.countdown-banner-shortcode {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dc3545;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.15);
  font-family: inherit;
  padding: 25px 20px;
  text-align: center;
  margin: 2em 0;
  position: relative;
  overflow: hidden;
}

/* Countdown timer container - now first element */
.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px 0;
  flex-wrap: wrap;
}

/* Common styles for both banner types */
.countdown-banner-fixed h3,
.countdown-banner-shortcode h3 {
  margin: 0 0 15px 0;
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 700;
  color: #212529;
  letter-spacing: 0.5px;
}

.countdown-banner-fixed p,
.countdown-banner-shortcode p {
  margin: 15px 0 0 0;
  font-size: clamp(14px, 2vw, 16px);
  color: #6c757d;
  font-weight: 500;
}

/* Individual time blocks */
.countdown-timer .time-block {
  background: #dc3545;
  color: white;
  padding: 12px 8px;
  border-radius: 8px;
  min-width: 60px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
  position: relative;
  overflow: hidden;
}

.countdown-timer .time-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.countdown-timer .time-number {
  display: block;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}

.countdown-timer .time-label {
  display: block;
  font-size: clamp(10px, 1.5vw, 12px);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* Separator between time blocks */
.countdown-timer .separator {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  color: #495057;
  margin: 0 4px;
}

/* CTA Button */
.countdown-banner-cta {
  display: inline-block;
  padding: 12px 30px;
  background: #dc3545;
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: clamp(14px, 2vw, 16px);
  margin: 0 0 15px 0;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.countdown-banner-cta:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
  color: white;
  text-decoration: none;
}

/* Push all content down to account for fixed banner */
/* body.has-countdown-banner {
  margin-top: 90px !important;
} */

/* body.has-countdown-banner * {
  position: relative;
} */

/* Ensure header and all content appears below banner */
body.has-countdown-banner header,
body.has-countdown-banner .header,
body.has-countdown-banner nav,
body.has-countdown-banner .nav,
body.has-countdown-banner .site-header,
body.has-countdown-banner .main-header {
  margin-top: 0 !important;
  top: 0 !important;
}

/* WordPress admin bar adjustments */
body.admin-bar .countdown-banner-fixed {
  top: 32px;
}

/* body.admin-bar.has-countdown-banner {
  margin-top: 122px !important;
} */

@media screen and (max-width: 782px) {
  body.admin-bar .countdown-banner-fixed {
    top: 46px;
  }

  body.has-countdown-banner {
    margin-top: 85px !important;
  }

  body.admin-bar.has-countdown-banner {
    margin-top: 131px !important;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .countdown-banner-fixed,
  .countdown-banner-shortcode {
    padding: 15px 10px;
  }
  
  .countdown-timer {
    gap: 6px;
  }
  
  .countdown-timer .time-block {
    min-width: 50px;
    padding: 10px 6px;
  }
  
  .countdown-timer .separator {
    margin: 0 2px;
  }
}

@media (max-width: 480px) {
  .countdown-timer {
    gap: 4px;
  }
  
  .countdown-timer .time-block {
    min-width: 45px;
    padding: 8px 4px;
  }
  
  .countdown-timer .separator {
    display: none;
  }
}

/* Expired state */
.countdown-expired {
  background: #6c757d !important;
  color: white;
  padding: 15px;
  border-radius: 8px;
  font-weight: 600;
  font-size: clamp(16px, 2.5vw, 18px);
}
