/* phone-confirm.css — the "can we text this number?" dialog on the book and
   contact forms, plus the submit button's in-flight spinner. Loaded only on
   pages that include scripts/phone-confirm.js. */

.phone-confirm {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 29, 58, 0.55);
}

.phone-confirm[hidden] { display: none; }

.phone-confirm__card {
  background: var(--bg, #fff);
  color: var(--fg, #0b1d3a);
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  padding: 28px 26px 24px;
  box-shadow: 0 24px 64px rgba(11, 29, 58, 0.35);
}

.phone-confirm__title {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
}

.phone-confirm__body {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-muted, #4a6480);
}

.phone-confirm__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-confirm__actions .btn { width: 100%; justify-content: center; }

@media (min-width: 480px) {
  .phone-confirm__actions { flex-direction: row-reverse; }
  .phone-confirm__actions .btn { width: auto; flex: 1; }
}

/* In-flight submit: a small ring next to the button label while the number is
   checked and the request sent. The button element itself gets .is-busy from
   form-errors.js setBusy(). */
.is-busy { position: relative; }

.is-busy::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: phone-confirm-spin 0.7s linear infinite;
}

@keyframes phone-confirm-spin {
  to { transform: rotate(360deg); }
}

/* Reduced motion: hold the ring still. The label text ("Sending") carries the
   state; the ring just marks that something is happening. */
@media (prefers-reduced-motion: reduce) {
  .is-busy::after { animation: none; opacity: 0.6; }
}
