/* VENDOR-COPY — do not edit here.
 * SOURCE: /Volumes/FileSync/AI/Claude/Projects/Site-Kit/widgets/modal/modal.css
 * COPIED: 2026-09-03.
 *
 * ONE ADAPTATION, and it is the same one sk-form.css carries: the widget
 * shipped literal hues and its own :root[data-theme='dark'] block, because it
 * was written for a host that might define nothing. FHT defines --surface,
 * --ink, --muted, --line, --accent, --radius, --sans and --lift on :root for
 * ALL FOUR theme paths (light, dark, system, explicit stamp), so every value
 * below reads one of those instead. That is why the widget's own dark block is
 * gone rather than translated: the tokens already flip, and a second dark rule
 * would be a second thing to keep in step.
 *
 * The backdrop reuses .navscrim's exact value from style.css — rgba(16,22,30,.45),
 * deliberately dark on both themes, because a scrim made of --ink would go
 * WHITE on the dark palette. Same scrim, one appearance, no new colour.
 *
 * Geometry, structure and every class name are the widget's, untouched.
 * Fix bugs in Site-Kit and re-copy; never read across projects at runtime.
 */

.sk-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 22, 30, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
}

.sk-modal {
  background: var(--sk-modal-bg, var(--surface));
  color: var(--sk-modal-text, var(--ink));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--lift);
  font-family: var(--sk-font, var(--sans));
}
.sk-modal-wide { max-width: 760px; }

.sk-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.sk-modal-eyebrow {
  margin: 0 0 2px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sk-gold, var(--accent));
}

.sk-modal-title { margin: 0; font-size: 1.15rem; font-weight: 700;
  font-family: var(--serif); color: var(--navy); }

.sk-modal-close {
  border: none;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
.sk-modal-close:hover { background: color-mix(in srgb, var(--ink) 16%, transparent); }

.sk-modal-body { padding: 18px 20px; overflow-y: auto; }

/* A SECOND WINDOW DOES NOT DOUBLE THE SCRIM. When one opens over another the
   widget marks everything it neutralised with data-sk-inert, the window below
   included; that window stays visible and stops carrying its own scrim, so two
   stacked windows dim the page once rather than twice. */
.sk-modal-backdrop[data-sk-inert] { background: transparent; }

.sk-modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* THE PHONE. A 480px card centred in a 390px viewport with 24px of padding is
   a 342px column, and the widget's own form rules already switch to one column
   and 16px controls at 680px. This is the other half the owner asked for — the
   window meets the bottom edge instead of floating, which is the shape every
   phone sheet on this site already uses. */
@media (max-width: 680px) {
  .sk-modal-backdrop { padding: 0; align-items: flex-end; }
  .sk-modal { max-width: none; max-height: 92vh;
    border-radius: var(--radius) var(--radius) 0 0; border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sk-modal, .sk-modal-backdrop { transition: none !important; }
}
