/* pay.css — branded payment page mirroring calendar-pwa booking aesthetic.
   Squiggly bg, dark navy, teal-forward CTA, horizontal gradient accent on card. */

* { box-sizing: border-box; }

.pay-body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}

.bg-squiggly {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("/squiggly-bg.svg");
  background-repeat: repeat;
  background-size: 480px auto;
  opacity: 0.42;
  mix-blend-mode: lighten;
}

.pay-page {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 16px 56px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100dvh;
  justify-content: center;
}

.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* ---------- Card with horizontal gradient border ---------- */
.pay-card {
  position: relative;
  border-radius: 24px;
  padding: 28px 22px 22px;
  background:
    linear-gradient(180deg, rgba(20, 18, 42, 0.94) 0%, rgba(10, 9, 26, 0.96) 100%);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(7, 237, 190, 0.10);
}
.pay-card::before {
  content: "";
  position: absolute;
  inset: -3px;
  padding: 3px;
  border-radius: 24px;
  /* GDKC card border — teal + mid-purple wrapped evenly (no pink). Matches the
     /get-started picker. */
  background: conic-gradient(from 0deg,
    #07EDBE 0deg, #C77DFF 40deg, #C77DFF 140deg, #07EDBE 180deg,
    #C77DFF 220deg, #C77DFF 320deg, #07EDBE 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Brand head ---------- */
.brand-head {
  text-align: center;
  margin-bottom: 18px;
}
.logo-orb {
  width: 128px; height: 128px;
  margin: 0 auto 10px;
  border-radius: 50%;
  /* No gradient ring — just the white logo disc. */
  background: #FFFFFF;
  padding: 0;
  box-shadow: 0 0 32px rgba(7, 237, 190, 0.20);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.logo-orb::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #FFFFFF;
  z-index: 0;
}
.rive-canvas {
  position: relative;
  z-index: 1;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  display: block;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ---------- Line items + total ---------- */
.line-items {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
}
.line-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(248, 248, 248, 0.10);
  font-size: 14px;
}
.line-item:last-child { border-bottom: none; }
.li-name { color: var(--text); }
.li-qty { color: var(--text-muted); margin-left: 6px; font-size: 12px; }
.li-amt { color: var(--text); font-weight: 600; white-space: nowrap; }

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 14px;
  margin-bottom: 18px;
  border-top: 1px solid rgba(248, 248, 248, 0.18);
}
.total-row .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.total-row .amount {
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--teal);
}

/* ---------- Paid pill ---------- */
.paid-pill {
  text-align: center;
  margin: 8px 0 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(7, 237, 190, 0.18);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

/* ---------- Pay form ---------- */
.pay-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}
#payment-element {
  border-radius: 14px;
  background: var(--bg);
  padding: 14px;
  border: 1px solid rgba(248, 248, 248, 0.12);
}
/* 3-layer pay button:
 *   outer  — solid GDKC light purple ring (3px)
 *   middle — solid white ring (3px, via ::after inset 3px)
 *   inner  — animated flowing linear gradient pill
 *
 * Matches the landing-page CTA aesthetic Andrew called out. The flow is a
 * linear gradient with oversized background-size whose position animates
 * across — same trick as a CSS shimmer but slower and seamless (color stops
 * loop back to the start). */
.btn-pay-anim {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--light-purple, #A08CFF);
  cursor: pointer;
  isolation: isolate;
  box-shadow: 0 0 24px rgba(160, 140, 255, 0.40),
              0 0 12px rgba(7, 237, 190, 0.18);
  transition: box-shadow 200ms ease, transform 80ms ease;
}
.btn-pay-anim::after {
  /* White ring sandwiched between the purple outer and the gradient inner */
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: #FFFFFF;
  z-index: 1;
}
.pay-anim-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px;
  padding: 14px 20px;
  border-radius: 999px;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(10, 9, 26, 0.35);
  /* Static fallback gradient — paper-mesh shader paints over this when WebGL
   * is available. If WebGL fails, this 3-stop diagonal still looks on-brand
   * (matches the landing-page hero CTA fallback). */
  background: linear-gradient(135deg, #07EDBE 0%, #9945FF 50%, #FF7EC0 100%);
  transition: filter 120ms ease, transform 80ms ease;
  overflow: hidden;
  isolation: isolate;
}
.pay-anim-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
}
.pay-anim-mesh canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit;
}
.pay-anim-label {
  position: relative;
  z-index: 1;
}
.btn-pay-anim:hover:not([disabled]) {
  box-shadow: 0 0 36px rgba(160, 140, 255, 0.55),
              0 0 16px rgba(7, 237, 190, 0.25);
}
.btn-pay-anim:hover:not([disabled]) .pay-anim-inner { filter: brightness(1.08); }
.btn-pay-anim:active:not([disabled]) .pay-anim-inner { transform: scale(0.97); }
.btn-pay-anim[disabled] { opacity: 0.55; cursor: not-allowed; }

.error-msg {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 80, 80, 0.10);
  border: 1px solid rgba(255, 80, 80, 0.30);
  color: #ff8a8a;
  font-size: 13px;
  text-align: center;
}

.secure-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.contact-note {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.contact-note a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 700;
}

[hidden] { display: none !important; }
