/**
 * Countdown Banner Styles
 * Styling for the Open Enrollment countdown banner
 */

.countdown-banner {
  /* background: linear-gradient(
    135deg,
    var(--link-color) 0%,
    var(--royal-blue) 100%
  ); */
  /* background: linear-gradient(135deg, #2866a8 0%, #1f4772 100%); */
  background: linear-gradient(90deg, #133437fb, #0c3343fd);
  color: white;
  padding: 1.5rem 0;
  position: relative;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.6s ease-out;
  border-bottom: 3px solid var(--gold);
}

@keyframes slideDown {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.countdown-banner.urgent {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  }
  50% {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
  }
  100% {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  }
}

.countdown-banner.active {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.countdown-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.countdown-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.countdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.countdown-header i {
  font-size: 1.5rem;
  color: var(--gold);
}

.countdown-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  font-family: "DM Serif Display", serif;
}

.countdown-message {
  margin-bottom: 1rem;
}

.countdown-message p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.95;
}

.countdown-message strong {
  color: var(--gold);
  font-weight: 700;
}

.countdown-timer {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-start;
  align-items: flex-end;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-width: 70px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.time-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: "Nunito Sans", Arial, sans-serif;
  color: white;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.time-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.5px;
}

.countdown-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.countdown-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.countdown-btn.btn-primary {
  background-color: var(--gold);
  color: var(--royal-blue);
  border: 2px solid var(--gold);
}

.countdown-btn.btn-primary:hover {
  background-color: white;
  color: var(--royal-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(246, 184, 67, 0.4);
}

.countdown-btn.btn-outline-primary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.countdown-btn.btn-outline-primary:hover {
  background-color: white;
  color: var(--royal-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.countdown-close {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.countdown-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.countdown-close i {
  font-size: 1.5rem;
  color: white;
}

/* Dark theme overrides */

[data-theme="dark"] .countdown-banner.urgent {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

[data-theme="dark"] .countdown-banner.active {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

[data-theme="dark"] .time-unit {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .countdown-close {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .countdown-close:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
  .countdown-banner {
    padding: 1rem 0;
  }

  .countdown-container {
    flex-direction: column;
    gap: 1rem;
    padding: 0 0.75rem;
  }

  .countdown-header h3 {
    font-size: 1.2rem;
  }

  .countdown-message p {
    font-size: 1rem;
  }

  .countdown-timer {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .time-unit {
    min-width: 60px;
    padding: 0.5rem 0.75rem;
  }

  .time-value {
    font-size: 1.5rem;
  }

  .time-label {
    font-size: 0.7rem;
  }

  .countdown-actions {
    justify-content: center;
    flex-direction: column;
    width: 100%;
  }

  .countdown-btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
  }

  .countdown-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 35px;
    height: 35px;
  }

  .countdown-close i {
    font-size: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .countdown-banner {
    padding: 0.75rem 0;
  }

  .countdown-container {
    padding: 0 0.5rem;
  }

  .countdown-header {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .countdown-header h3 {
    font-size: 1.1rem;
  }

  .countdown-timer {
    gap: 0.75rem;
  }

  .time-unit {
    min-width: 55px;
    padding: 0.5rem 0.5rem;
  }

  .time-value {
    font-size: 1.3rem;
  }

  .time-label {
    font-size: 0.65rem;
  }

  .countdown-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 30px;
    height: 30px;
  }
}

/* Animation for urgent state */
.countdown-banner.urgent .time-unit {
  animation: urgentPulse 1.5s infinite;
}

@keyframes urgentPulse {
  0%,
  100% {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1);
  }
  50% {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .countdown-banner {
    border-bottom: 4px solid var(--gold);
  }

  .time-unit {
    border: 2px solid rgba(255, 255, 255, 0.5);
  }

  .countdown-close {
    border: 2px solid rgba(255, 255, 255, 0.5);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .countdown-banner {
    animation: none;
  }

  .countdown-banner.urgent {
    animation: none;
  }

  .countdown-banner.urgent .time-unit {
    animation: none;
  }

  .countdown-btn:hover,
  .countdown-close:hover {
    transform: none;
  }
}
