/* Classic official countdown — landing + member dashboard */

.ec-cdown-host {
  display: grid;
  gap: 1.25rem;
}

.ec-cdown-host[hidden] {
  display: none !important;
}

.ec-cdown-host--landing {
  max-width: 72rem;
  margin: 0 auto;
}

.ec-cdown-host--dashboard {
  margin: 0 0 1rem;
}

.ec-cdown {
  position: relative;
  color: inherit;
}

.ec-cdown__frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 15.5rem;
  padding: 1.85rem 1.6rem 1.55rem;
  color: #102033;
  background-color: #7ec8e8;
  background-image: url("../assets/countdown/buni-countdown-pc.png");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px rgba(28, 22, 12, 0.1);
}

.ec-cdown__bg-wrap,
.ec-cdown__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.ec-cdown__bg {
  display: block;
  object-fit: cover;
  object-position: right center;
}

.ec-cdown__frame > * {
  position: relative;
  z-index: 2;
}

.ec-cdown__frame > .ec-cdown__bg-wrap {
  z-index: 0;
}

.ec-cdown__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.38) 0%,
    rgba(255, 255, 255, 0.12) 36%,
    transparent 58%
  );
}

.ec-cdown__frame::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 0;
}

html.dark .ec-cdown__frame {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

html.dark .ec-cdown__frame::before {
  background: linear-gradient(
    90deg,
    rgba(8, 16, 28, 0.42) 0%,
    rgba(8, 16, 28, 0.16) 38%,
    transparent 62%
  );
}

html.dark .ec-cdown__frame::after {
  border-color: rgba(255, 255, 255, 0.16);
}

.ec-cdown-host--landing .ec-cdown__frame {
  text-align: left;
  min-height: 17.5rem;
  padding: 2.25rem 2rem 1.85rem;
}

.ec-cdown__kicker {
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #14532d;
}

html.dark .ec-cdown__kicker {
  color: #86efac;
}

.ec-cdown__title {
  margin: 0;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2.4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: #1c1914;
}

html.dark .ec-cdown__title {
  color: #f4efe4;
}

.ec-cdown__meta {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: #334155;
}

html.dark .ec-cdown__meta {
  color: #cbd5e1;
}

.ec-cdown__rule {
  width: 4.5rem;
  height: 1px;
  margin: 1.1rem 0 1.2rem;
  background: linear-gradient(90deg, #166534, #dc2626, transparent);
}

.ec-cdown__live {
  margin: 0.2rem 0 0;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
  color: #2f6b45;
}

.ec-cdown__clock {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.35rem 0.45rem;
  flex-wrap: wrap;
}

.ec-cdown-host--dashboard .ec-cdown__clock {
  justify-content: flex-start;
}

.ec-cdown__unit {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  min-width: 4.15rem;
}

.ec-cdown__colon {
  display: flex;
  align-items: center;
  min-height: 3.6rem;
  padding-top: 0.05rem;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1;
  color: #b08a3a;
}

.ec-cdown__flip {
  position: relative;
  width: 100%;
  min-width: 3.6rem;
  min-height: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #8d7340;
  border-radius: 3px;
  background:
    linear-gradient(180deg, #2a3140 0%, #1b212c 48%, #141920 52%, #10141c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -8px 12px rgba(0, 0, 0, 0.28);
}

.ec-cdown__flip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.ec-cdown__value {
  position: relative;
  z-index: 1;
  display: block;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #f3ead4;
}

.ec-cdown__label {
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1e293b;
}

html.dark .ec-cdown__label {
  color: #e2e8f0;
}

.ec-cdown__caption {
  margin: 0.95rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #14532d;
}

html.dark .ec-cdown__caption {
  color: #86efac;
}

.ec-cdown__unit.is-tick .ec-cdown__value {
  animation: ec-cdown-tick 0.42s ease;
}

@keyframes ec-cdown-tick {
  0% {
    opacity: 0.35;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.ec-dash-cal__cell.has-countdown {
  box-shadow: inset 0 0 0 1px rgba(176, 138, 58, 0.55);
}

.ec-dash-cal__cell.has-countdown .ec-dash-cal__titles::after {
  content: " · countdown";
  color: #b08a3a;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .ec-cdown__unit.is-tick .ec-cdown__value {
    animation: none;
  }
}

@media (max-width: 768px) {
  .ec-cdown__frame,
  .ec-cdown-host--landing .ec-cdown__frame {
    min-height: 16.5rem;
    background-image: url("../assets/countdown/buni-countdown-phone.png");
    background-position: right center;
    color: #f8fafc !important;
  }

  /* Stronger scrim so title + timer stay readable over green/red artwork */
  .ec-cdown__frame::before {
    background: linear-gradient(
      180deg,
      rgba(8, 16, 28, 0.86) 0%,
      rgba(8, 16, 28, 0.72) 40%,
      rgba(8, 16, 28, 0.78) 100%
    ) !important;
  }

  html.dark .ec-cdown__frame::before {
    background: linear-gradient(
      180deg,
      rgba(8, 16, 28, 0.88) 0%,
      rgba(8, 16, 28, 0.74) 48%,
      rgba(8, 16, 28, 0.8) 100%
    ) !important;
  }

  .ec-cdown__kicker,
  .ec-cdown__caption,
  html.light .ec-land-page .ec-cdown__kicker,
  html.light .ec-land-page .ec-cdown__caption {
    color: #bbf7d0 !important;
    -webkit-text-fill-color: #bbf7d0 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  }

  .ec-cdown__title,
  html.light .ec-land-page .ec-cdown__title,
  html.light .ec-land-page .ec-cdown__frame h3 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  }

  .ec-cdown__meta,
  .ec-cdown__label,
  html.light .ec-land-page .ec-cdown__meta,
  html.light .ec-land-page .ec-cdown__label,
  html.light .ec-land-page .ec-cdown__frame p {
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  }

  .ec-cdown__live,
  html.light .ec-land-page .ec-cdown__live {
    color: #86efac !important;
    -webkit-text-fill-color: #86efac !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  }

  .ec-cdown__colon {
    color: #fbbf24 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  }

  .ec-cdown__flip {
    border-color: rgba(251, 191, 36, 0.55);
  }

  .ec-cdown__value,
  html.light .ec-land-page .ec-cdown__value {
    color: #fff8e7 !important;
    -webkit-text-fill-color: #fff8e7 !important;
  }

  html.dark .ec-cdown__kicker,
  html.dark .ec-cdown__caption {
    color: #bbf7d0 !important;
  }

  html.dark .ec-cdown__title {
    color: #ffffff !important;
  }

  html.dark .ec-cdown__meta,
  html.dark .ec-cdown__label {
    color: #f1f5f9 !important;
  }
}

@media (max-width: 560px) {
  .ec-cdown__frame {
    padding: 1.25rem 1rem 1.15rem;
  }

  .ec-cdown__unit {
    min-width: 3.2rem;
  }

  .ec-cdown__flip {
    min-width: 2.85rem;
    min-height: 2.85rem;
  }

  .ec-cdown__value {
    font-size: 1.2rem;
  }

  .ec-cdown__colon {
    min-height: 2.85rem;
    font-size: 1.2rem;
  }

  .ec-cdown__label {
    letter-spacing: 0.1em;
  }
}
