/* ==========================================================================
   The Go Network — preview-mode messaging
   Two treatments, both front-end only (see TGN_Preview_Mode_Implementation_Notes.md):

   1. Inline message swap — assets/js/preview-mode.js hides a form's fields
      and submit button on click and drops .tgn-pm-message in their place.
   2. Warn-then-allow modal — intercepts practitioner mailto/tel/offsite
      links with .tgn-pm-overlay + .tgn-pm-modal before letting them through.

   Tokens come from tgn-tokens.css, loaded on every page ahead of this file.
   ========================================================================== */

.tgn-pm-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--tgn-blue-tint);
  border: 1px solid var(--tgn-parchment-200);
  border-radius: var(--tgn-radius-inset);
  padding: 16px 18px;
  margin: 4px 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--tgn-ink);
  max-width: 46ch;
}

.tgn-pm-message:focus {
  outline: none;
}

.tgn-pm-message__icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--tgn-brick-label);
}

/* ---- Modal (shared by the info-only and warn-then-allow variants) ---- */

.tgn-pm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 20, 17, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.tgn-pm-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--tgn-white);
  border-radius: var(--tgn-radius-card);
  box-shadow: 0 24px 60px rgba(23, 20, 17, 0.28);
  padding: 32px 28px 28px;
}

.tgn-pm-modal:focus {
  outline: none;
}

.tgn-pm-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--tgn-radius-badge);
  background: transparent;
  color: var(--tgn-parchment-400);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.tgn-pm-modal__close:hover {
  background: var(--tgn-parchment-100);
  color: var(--tgn-ink);
}

.tgn-pm-modal__eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tgn-brick-label);
  margin: 0 0 10px;
}

.tgn-pm-modal__body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tgn-ink);
  margin: 0;
  padding-right: 20px;
}

.tgn-pm-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.tgn-pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--tgn-radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 13px 24px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.tgn-pm-btn:focus-visible {
  outline: 2px solid var(--tgn-brick);
  outline-offset: 2px;
}

.tgn-pm-btn--primary {
  background: var(--tgn-cta);
  color: var(--tgn-ink);
}

.tgn-pm-btn--primary:hover {
  background: #e86e00;
}

.tgn-pm-btn--secondary {
  background: transparent;
  border: 1.5px solid var(--tgn-parchment-300);
  color: var(--tgn-ink);
}

.tgn-pm-btn--secondary:hover {
  border-color: var(--tgn-brick);
}

@media (prefers-reduced-motion: reduce) {
  .tgn-pm-btn,
  .tgn-pm-modal__close {
    transition: none;
  }
}
