/* ── How Long Until ───────────────────────────────────────────── */

.hlu-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 880px;
  margin: 2rem auto;
  background: #f5f3ff;
  border: 1.5px solid #c4b5fd;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(109,40,217,0.13);
  color: #1e1b4b;
  box-sizing: border-box;
}

/* ── Header ──────────────────────────────────────────────────── */

.hlu__header {
  background: linear-gradient(135deg, #0f0e2a 0%, #1e1b4b 35%, #312e81 70%, #4338ca 100%);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  position: relative;
  overflow: hidden;
}

.hlu__header::before {
  content: '⏰';
  position: absolute;
  right: 1rem; top: 50%;
  transform: translateY(-50%);
  font-size: 7rem;
  opacity: 0.08;
  pointer-events: none;
}

.hlu__header h2 {
  font-size: clamp(1.4rem, 4vw, 1.95rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

.hlu__header p { font-size: 0.93rem; color: #c4b5fd; margin: 0; }

/* ── Form section ─────────────────────────────────────────────── */

.hlu__form-section {
  padding: clamp(1rem, 3vw, 1.75rem);
}

.hlu__form-card {
  background: #fff;
  border: 1.5px solid #ddd6fe;
  border-radius: 14px;
  padding: 1.35rem;
}

.hlu__form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 540px) { .hlu__form-row { grid-template-columns: 1fr; } }

.hlu__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  color: #6d28d9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

/* ── Time picker ─────────────────────────────────────────────── */

.hlu__time-picker {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: #f5f3ff;
  border: 1.5px solid #ddd6fe;
  border-radius: 9px;
  padding: 0.55rem 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hlu__time-picker:focus-within {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
  background: #fff;
}

.hlu__time-input {
  width: 2.4rem;
  border: none;
  background: transparent;
  font-size: 1.35rem;
  font-weight: 900;
  color: #1e1b4b;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
  outline: none;
}

.hlu__time-input::-webkit-inner-spin-button,
.hlu__time-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.hlu__time-sep {
  font-size: 1.35rem;
  font-weight: 900;
  color: #7c3aed;
  line-height: 1;
}

.hlu__ampm-wrap { display: flex; flex-direction: column; gap: 2px; margin-left: 0.25rem; }

.hlu__ampm-btn {
  padding: 0.22rem 0.55rem;
  border-radius: 5px;
  border: 1.5px solid #ddd6fe;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  background: transparent;
  color: #7c3aed;
  line-height: 1;
  transition: all 0.15s;
}

.hlu__ampm-btn.active {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}

/* Date input */
.hlu__date-input {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1.5px solid #ddd6fe;
  border-radius: 9px;
  font-size: 0.95rem;
  color: #1e1b4b;
  background: #f5f3ff;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hlu__date-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
  background: #fff;
}

/* Quick presets */
.hlu__quick-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.55rem;
}

.hlu__quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.hlu__quick-btn {
  padding: 0.42rem 0.9rem;
  border-radius: 20px;
  border: 1.5px solid #ddd6fe;
  background: #fff;
  color: #5b21b6;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.hlu__quick-btn:hover { background: #ede9fe; border-color: #a78bfa; }
.hlu__quick-btn.active { background: #7c3aed; color: #fff; border-color: #7c3aed; }

/* Hour group rows */
.hlu__hour-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.hlu__hour-group-label {
  font-size: 0.7rem;
  font-weight: 900;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.5rem 0.22rem 0;
  border-right: 2px solid #ede9fe;
  margin-right: 0.15rem;
  min-width: 26px;
  text-align: center;
}

.hlu__hour-btn {
  padding: 0.3rem 0.55rem;
  border-radius: 16px;
  border: 1.5px solid #ddd6fe;
  background: #fff;
  color: #5b21b6;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
}

.hlu__hour-btn:hover  { background: #ede9fe; border-color: #a78bfa; }
.hlu__hour-btn.active { background: #7c3aed; color: #fff; border-color: #7c3aed; }

/* Start button */
.hlu__start-btn {
  width: 100%;
  padding: 0.92rem;
  background: linear-gradient(135deg, #6d28d9 0%, #4338ca 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 18px rgba(109,40,217,0.32);
  transition: filter 0.15s, transform 0.1s;
}

.hlu__start-btn:hover  { filter: brightness(1.08); }
.hlu__start-btn:active { transform: scale(0.99); }

/* ── Countdown display ───────────────────────────────────────── */

.hlu__countdown {
  margin: 0 clamp(1rem,3vw,1.75rem) clamp(1rem,3vw,1.75rem);
  background: linear-gradient(135deg, #0f0e2a 0%, #1a1540 50%, #0f172a 100%);
  border: 1px solid #312e81;
  border-radius: 16px;
  padding: 1.75rem 1.5rem 1.5rem;
  display: none;
}

.hlu__countdown.visible { display: block; }

/* Target label */
.hlu__target-label {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
}

.hlu__target-time {
  text-align: center;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: 700;
  color: #e9d5ff;
  margin-bottom: 1.75rem;
}

/* ── SVG Progress Ring ───────────────────────────────────────── */

.hlu__ring-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
}

.hlu__ring-svg { overflow: visible; }

.hlu__ring-track { stroke: #1e1b4b; }
.hlu__ring-fill  {
  stroke-linecap: round;
  transform-origin: center;
  transform: rotate(-90deg);
  transition: stroke-dashoffset 0.8s ease;
}

.hlu__ring-center {
  font-size: 0; /* hide until JS fills it */
}

.hlu__ring-pct {
  font-size: 0.9rem;
  font-weight: 800;
  fill: #a78bfa;
}

.hlu__ring-sub {
  font-size: 0.55rem;
  font-weight: 700;
  fill: #6d28d9;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Digit boxes ─────────────────────────────────────────────── */

.hlu__digits {
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1rem);
  margin-bottom: 1.5rem;
}

.hlu__digit-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(68px, 15vw, 92px);
}

.hlu__digit-card {
  width: 100%;
  padding: clamp(0.7rem, 2vw, 1rem) 0.5rem;
  border-radius: 12px;
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s;
}

.hlu__digit-card::after {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 100%;
  height: 1px;
  background: rgba(0,0,0,0.2);
}

.hlu__digit-card.days    { background: #2d1b69; color: #e9d5ff; border: 1.5px solid #5b21b6; }
.hlu__digit-card.hours   { background: #1e1b5e; color: #c7d2fe; border: 1.5px solid #4338ca; }
.hlu__digit-card.minutes { background: #0c2051; color: #bae6fd; border: 1.5px solid #1d4ed8; }
.hlu__digit-card.seconds {
  background: #0a2340;
  color: #67e8f9;
  border: 1.5px solid #0891b2;
  animation: hlu-sec-pulse 1s ease-in-out infinite;
}

@keyframes hlu-sec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6,182,212,0); }
  50%       { box-shadow: 0 0 14px 2px rgba(6,182,212,0.25); }
}

.hlu__digit-lbl {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.hlu__digit-box.days .hlu__digit-lbl    { color: #a78bfa; }
.hlu__digit-box.hours .hlu__digit-lbl   { color: #818cf8; }
.hlu__digit-box.minutes .hlu__digit-lbl { color: #60a5fa; }
.hlu__digit-box.seconds .hlu__digit-lbl { color: #22d3ee; }

/* Colon separators */
.hlu__colon {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  color: #4338ca;
  align-self: flex-start;
  padding-top: clamp(0.7rem, 2vw, 1rem);
  animation: hlu-blink 1s step-end infinite;
  line-height: 1;
}

@keyframes hlu-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ── Progress bar ────────────────────────────────────────────── */

.hlu__progress-wrap {
  margin-bottom: 1.25rem;
}

.hlu__progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 0.4rem;
}

.hlu__progress-bar {
  height: 6px;
  background: #1e1b4b;
  border-radius: 999px;
  overflow: hidden;
}

.hlu__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6d28d9, #7c3aed, #06b6d4);
  border-radius: 999px;
  transition: width 0.9s ease;
  width: 0%;
}

/* ── Info chips ──────────────────────────────────────────────── */

.hlu__info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hlu__info-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.55rem 0.9rem;
  background: #1e1b4b;
  border: 1px solid #312e81;
  border-radius: 10px;
}

.hlu__chip-val { font-size: 0.95rem; font-weight: 800; color: #e9d5ff; }
.hlu__chip-lbl { font-size: 0.67rem; font-weight: 700; color: #7c3aed; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.1rem; }

/* Action buttons */
.hlu__actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.hlu__action-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1.5px solid #312e81;
  background: #1e1b4b;
  color: #c4b5fd;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.hlu__action-btn:hover { background: #312e81; border-color: #7c3aed; color: #e9d5ff; }

/* Arrived state */
.hlu__arrived {
  text-align: center;
  padding: 1.5rem;
  display: none;
}

.hlu__arrived.visible { display: block; }

.hlu__arrived-emoji { font-size: 3.5rem; display: block; margin-bottom: 0.5rem; animation: hlu-pop 0.5s ease; }

@keyframes hlu-pop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.hlu__arrived-txt { font-size: 1.4rem; font-weight: 900; color: #e9d5ff; margin-bottom: 0.25rem; }
.hlu__arrived-sub { font-size: 0.9rem; color: #a78bfa; }

/* ── Tip ─────────────────────────────────────────────────────── */

.hlu__tip {
  margin: 0 clamp(1rem,3vw,1.75rem) clamp(1rem,3vw,1.75rem);
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1.5px solid #ddd6fe;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #5b21b6;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
