:root {
  --countdown-blue-dark: #041780;
  --countdown-blue-main: #0038a1;
}

.countdown-wrapper,
.countdown-wrapper * {
  box-sizing: border-box;
}

.countdown-wrapper {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 1rem;
  left: 0;
  display: flex;
  justify-content: center;
  padding-inline: 2rem;
  pointer-events: none;
  font-family: "Euclid Circular A", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  animation: countdown-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.countdown-wrapper[hidden] {
  display: none;
}

.countdown-bar {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 100%;
  gap: 1.25rem;
  padding: 1rem 4rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--countdown-blue-dark) 0%, var(--countdown-blue-main) 58%, var(--countdown-blue-main) 100%);
  box-shadow: 0 20px 46px rgba(0, 56, 161, 0.38), 0 8px 18px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  pointer-events: auto;
}

.countdown-timer {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.3rem;
}

.countdown-unit {
  display: flex;
  min-width: 2.6rem;
  flex-direction: column;
  align-items: center;
}

.countdown-value {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.countdown-label {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.countdown-separator {
  margin-bottom: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  animation: countdown-blink 1.2s ease-in-out infinite;
}

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

.countdown-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.countdown-cta--ticket {
  background: #ffffff;
  color: var(--countdown-blue-dark);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
}

.countdown-cta--whatsapp {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.countdown-cta-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
}

.countdown-cta:hover {
  filter: brightness(1.12);
  transform: translateY(-2px) scale(1.03);
}

.countdown-cta--ticket:hover {
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.23);
}

.countdown-cta--whatsapp:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.countdown-cta:focus-visible,
.countdown-close:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.countdown-close {
  position: absolute;
  top: -10px;
  right: -10px;
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(4, 23, 128, 0.28);
  border-radius: 50%;
  background: #ffffff;
  color: var(--countdown-blue-dark);
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.countdown-close svg {
  width: 14px;
  height: 14px;
}

.countdown-close:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  transform: scale(1.08) rotate(90deg);
}

@keyframes countdown-enter {
  from {
    opacity: 0;
    transform: translateY(120%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes countdown-blink {
  0%, 100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .countdown-wrapper {
    padding-inline: 0.75rem;
  }

  .countdown-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    row-gap: 0.6rem;
    padding: 0.8rem 0.8rem 0.8rem 1.1rem;
  }

  .countdown-unit {
    min-width: 2.2rem;
  }

  .countdown-value {
    font-size: 1rem;
  }

  .countdown-label {
    font-size: 0.5rem;
  }

  .countdown-actions {
    width: 100%;
    justify-content: center;
  }

  .countdown-cta {
    padding: 0.55rem 0.9rem;
    font-size: 0.72rem;
  }

  .countdown-close {
    right: -4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .countdown-wrapper,
  .countdown-separator {
    animation: none;
  }

  .countdown-cta,
  .countdown-close {
    transition: box-shadow 0.25s ease, filter 0.25s ease, background-color 0.25s ease;
  }

  .countdown-cta:hover,
  .countdown-close:hover {
    transform: none;
  }
}
