/* Warm Transfer — shared styles for the "Speak to us now" CTA + phone-capture modal.
   Used by every UK results template; kept generic enough to sit on top of the
   inline (Style A) and floating-dock (Style B) result layouts without per-template CSS. */

:root {
  --wt-teal: #2A7A78;
  --wt-teal-dark: #1D5C5A;
  --wt-deep: #1A2E2D;
  --wt-cream: #FDF8F4;
  --wt-live: #16a34a;
  --wt-live-ring: rgba(22, 163, 74, 0.45);
  --wt-error: #c53030;
  --wt-muted: #5f5e5a;
}

/* ---------- Primary "Speak to us now" CTA ---------- */

.wt-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 18px;
  background: var(--wt-teal);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  box-shadow: 0 6px 20px rgba(10, 90, 74, 0.22);
}
.wt-primary:hover { background: var(--wt-teal-dark); }
.wt-primary:active { transform: translateY(1px); }
.wt-primary[disabled] { opacity: 0.7; cursor: progress; }

.wt-primary-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.wt-primary-label { font-size: 16px; font-weight: 600; }
.wt-primary-sub {
  font-size: 12.5px;
  font-weight: 400;
  opacity: 0.92;
  letter-spacing: 0.01em;
}

@media (max-width: 380px) {
  .wt-primary-label { font-size: 15px; }
  .wt-primary-sub { font-size: 11.5px; }
}

/* Pulse — outer ring scales and fades behind the dot every ~2s.
   Pauses when the button is disabled (loading state) so it doesn't read as broken.
   Disabled entirely under prefers-reduced-motion. */
.wt-dot-wrap {
  position: relative;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
}
.wt-dot {
  position: absolute;
  inset: 0;
  background: var(--wt-live);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.wt-dot-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--wt-live-ring);
  animation: wt-pulse 2.2s ease-out infinite;
}
.wt-primary[disabled] .wt-dot-pulse,
.wt-modal-eyebrow .wt-dot-pulse.wt-paused {
  animation-play-state: paused;
  opacity: 0;
}
@keyframes wt-pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  80%  { transform: scale(2.6); opacity: 0;   }
  100% { transform: scale(2.6); opacity: 0;   }
}
@media (prefers-reduced-motion: reduce) {
  .wt-dot-pulse { animation: none; opacity: 0; }
}

/* ---------- Secondary "Book a 15-min call" CTA ---------- */
/* Used both as Style A demoted-state on the existing book-cta and as the
   Style B inline secondary inserted above the "Learn more" link. */
.wt-secondary {
  display: block;
  width: 100%;
  padding: 13px 16px;
  margin-top: 12px;
  background: transparent;
  color: var(--wt-teal);
  border: 1.5px solid var(--wt-teal);
  border-radius: 100px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  box-shadow: none;
}
.wt-secondary:hover { background: var(--wt-teal); color: #fff; }

/* When an existing .book-cta in Style A gets demoted, also strip its
   filled-background styling. Templates vary a lot — !important is the
   simplest way to win without per-template overrides. */
.book-cta.wt-secondary {
  background: transparent !important;
  color: var(--wt-teal) !important;
  border: 1.5px solid var(--wt-teal) !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  font-size: 14.5px !important;
  padding: 13px 16px !important;
}
.book-cta.wt-secondary:hover {
  background: var(--wt-teal) !important;
  color: #fff !important;
}

/* ---------- Modal ---------- */

.wt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 30, 0.55);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.wt-modal-overlay.wt-open { opacity: 1; }

.wt-modal {
  background: #fff;
  width: 100%;
  max-width: 460px;
  border-radius: 18px 18px 0 0;
  padding: 26px 22px calc(26px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  position: relative;
  font-family: inherit;
  color: var(--wt-deep);
}
.wt-modal-overlay.wt-open .wt-modal { transform: translateY(0); }

@media (min-width: 640px) {
  .wt-modal-overlay { align-items: center; padding: 24px; }
  .wt-modal { border-radius: 18px; padding: 28px; }
}

.wt-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--wt-muted);
  cursor: pointer;
  border-radius: 50%;
}
.wt-modal-close:hover { background: rgba(0,0,0,0.05); color: var(--wt-deep); }

.wt-modal-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--wt-teal-dark);
  margin-bottom: 12px;
}

.wt-modal-heading {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 8px;
}
.wt-modal-reassure {
  font-size: 14px;
  color: var(--wt-muted);
  line-height: 1.5;
  margin: 0 0 18px;
}

.wt-field {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #d8d6d2;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
  transition: border-color 0.15s;
}
.wt-field:focus-within { border-color: var(--wt-teal); }
.wt-field.wt-field-error { border-color: var(--wt-error); }
.wt-field-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #f6f4f0;
  font-size: 15px;
  font-weight: 500;
  color: var(--wt-deep);
  border-right: 1px solid #e6e3df;
}
.wt-field input {
  flex: 1;
  border: none;
  padding: 13px 12px;
  font-size: 16px; /* 16px prevents iOS auto-zoom */
  font-family: inherit;
  background: transparent;
  outline: none;
  color: var(--wt-deep);
  min-width: 0;
}

.wt-error-msg {
  font-size: 12.5px;
  color: var(--wt-error);
  min-height: 18px;
  margin: 0 0 10px;
}

.wt-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--wt-deep);
  margin: 6px 0 16px;
  cursor: pointer;
}
.wt-consent input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--wt-teal);
  cursor: pointer;
}

.wt-modal .wt-primary { margin-top: 4px; }
.wt-modal .wt-primary[disabled] { background: #b6c8c5; color: #fff; cursor: not-allowed; }

.wt-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--wt-muted);
  letter-spacing: 0.02em;
}
.wt-footer span { white-space: nowrap; }

.wt-schedule-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--wt-teal-dark);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  width: 100%;
  font-family: inherit;
}
.wt-schedule-link:hover { color: var(--wt-teal); }

.wt-fallback {
  background: #fef5f2;
  border: 1px solid #f5cdc0;
  color: #8a3a22;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 14px;
}

/* ---------- Waiting state (post-submit, before agent accept) ---------- */

.wt-progress { margin: 8px 0 14px; }
.wt-progress-track {
  width: 100%;
  height: 6px;
  background: #ece9e3;
  border-radius: 999px;
  overflow: hidden;
}
.wt-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--wt-teal), var(--wt-live));
  border-radius: 999px;
}
.wt-progress-meta {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--wt-muted);
  text-align: center;
  letter-spacing: 0.02em;
}
.wt-progress-seconds { font-weight: 600; color: var(--wt-deep); }

@media (prefers-reduced-motion: reduce) {
  /* Skip the smooth fill; just show the bar at 100% with the seconds-left
     readout doing the work. Avoids a jarring instant-100% animation. */
  .wt-progress-fill { transition: none !important; }
}

/* In waiting state the dot in the eyebrow keeps pulsing — that's the live
   "team's reaching out" cue. Nothing else changes. */
.wt-modal-waiting .wt-modal-eyebrow,
.wt-modal-expired .wt-modal-eyebrow { opacity: 0.85; }

.wt-modal-expired .wt-modal-eyebrow .wt-dot { background: #b6c8c5; }
.wt-modal-expired .wt-modal-eyebrow .wt-dot-pulse { display: none; }
.wt-expired-cta { margin-top: 4px; }

