/* ═══════════════════════════════════════════════════════════════════════
   M-U-S-I-C — the waitlist dialog (inc/waitlist-ui.php).

   Centred rather than a side drawer: the cart drawer is a running tally you
   glance at, and this is one short task you finish and leave. Making them
   look the same would say they are the same kind of thing.
   ═══════════════════════════════════════════════════════════════════════ */

.music-wl-scrim {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(2px);
}

body.music-wl-open { overflow: hidden; }

.music-wl {
  /* This theme has no global border-box reset — .music-container is deliberately
     content-box — so without this the padding is added to the width and the
     dialog hangs a few pixels past both edges of a phone. */
  box-sizing: border-box;
  position: fixed;
  z-index: 1210;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: min(calc(100vw - 32px), 460px);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #ffffff;
  border-radius: 18px;
  padding: clamp(24px, 4vw, 34px);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.28);
  animation: music-wl-in 180ms ease-out both;
}

@keyframes music-wl-in {
  from { opacity: 0; translate: -50% calc(-50% + 12px); }
  to   { opacity: 1; translate: -50% -50%; }
}

@media (prefers-reduced-motion: reduce) {
  .music-wl { animation: none; }
}

.music-wl__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #6b7280;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.music-wl__close:hover,
.music-wl__close:focus-visible { background: #f3efe6; color: #111827; }

.music-wl__title {
  font-family: var(--music-font-display, "Space Grotesk", sans-serif);
  font-size: clamp(22px, 3.4vw, 27px);
  line-height: 1.15;
  margin: 6px 0 0;
  color: #0f1729;
  text-wrap: balance;
}

/* The dates, given the weight the dates deserve — this is the one fact the
   person is checking before they hand over an address. */
.music-wl__for {
  margin: 10px 0 0;
  font-weight: 700;
  font-size: 17px;
  color: #d7374f;
}

.music-wl__for:empty { display: none; }

.music-wl__promise {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: #4b5563;
}

/* ── The form ─────────────────────────────────────────────────────────── */

.music-wl__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0 0;
}

.music-wl__field { margin: 0; }

.music-wl__field label {
  display: block;
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #374151;
}

.music-wl__field label span {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #9ca3af;
}

.music-wl__field input,
.music-wl__field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  font: inherit;
  font-size: 16px; /* iOS zooms anything under 16px on focus. */
  color: #111827;
  background: #fdfbf7;
  border: 1px solid #dfd7c9;
  border-radius: 10px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.music-wl__field textarea { resize: vertical; min-height: 62px; }

.music-wl__field input:focus,
.music-wl__field textarea:focus {
  outline: none;
  border-color: #d7374f;
  box-shadow: 0 0 0 3px rgba(215, 55, 79, 0.15);
}

/* Off-screen rather than display:none — some bots skip hidden fields, and a
   field they skip cannot catch them. */
.music-wl__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.music-wl__err {
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fdf2f4;
  border: 1px solid #f4c9d1;
  color: #a32036;
  font-size: 14px;
  line-height: 1.45;
}

.music-wl__submit {
  width: 100%;
  min-height: 48px;
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: #d7374f;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
}

.music-wl__submit:hover:not(:disabled) { background: #bf2d43; }
.music-wl__submit:active:not(:disabled) { transform: translateY(1px); }
.music-wl__submit:disabled { opacity: 0.6; cursor: default; }

.music-wl__submit--quiet {
  background: none;
  color: #111827;
  border: 1px solid #dfd7c9;
}

.music-wl__submit--quiet:hover:not(:disabled) { background: #f3efe6; }

.music-wl__fine {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #6b7280;
  text-align: center;
}

/* ── Done ─────────────────────────────────────────────────────────────── */

.music-wl__done { text-align: center; padding: 8px 0 0; }

.music-wl__tick {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f6ee;
  color: #16794a;
  font-size: 27px;
  line-height: 1;
}

.music-wl__msg {
  margin: 10px 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: #4b5563;
}

/* ── Triggers ─────────────────────────────────────────────────────────── */

/* A waitlist button is not an enrol button and must not be dressed as one:
   it is the honest second-best, so it reads as a considered offer rather than
   a consolation prize. */
.music-wl-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid #d7374f;
  border-radius: 999px;
  background: none;
  color: #d7374f;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.music-wl-trigger:hover,
.music-wl-trigger:focus-visible { background: #d7374f; color: #ffffff; }

.music-wl-trigger::after { content: "\2192"; font-weight: 400; }

/* Inside a cohort deck the trigger sits beside Enroll buttons, so it takes
   their metrics — a round pill at a larger size made the one full cohort the
   loudest thing in a row of six. */
.music-cohort-card .music-wl-trigger {
  min-height: 0;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
}

/* On the navy cohort deck the coral outline disappears into the card. */
.music-cohort-card:not(.music-cohort-card--light) .music-wl-trigger {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.music-cohort-card:not(.music-cohort-card--light) .music-wl-trigger:hover,
.music-cohort-card:not(.music-cohort-card--light) .music-wl-trigger:focus-visible {
  background: #ffffff;
  color: #111827;
  border-color: #ffffff;
}

@media (max-width: 420px) {
  .music-wl { border-radius: 14px; padding: 22px 18px; }
  .music-wl-trigger { width: 100%; justify-content: center; }
}
