/* hx-modal.css — Modal SSOT
 * Covers: modal, modal-alert, overlay
 */
 * hx-modals.css — Modals SSOT
 * Modal, ModalAlert, Overlay
 */
.hx-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
.hx-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--hx-surface);
  border-radius: var(--hx-radius);
  padding: var(--hx-space-4);
  max-width: 480px;
  width: 90%;
  z-index: 1001;
}
.hx-modal__title {
  color: var(--hx-fg);
  font-weight: var(--hx-font-weight-bold);
  margin-bottom: var(--hx-space-3);
}
.hx-modal__body {
  color: var(--hx-fg-muted);
  margin-bottom: var(--hx-space-4);
}
.hx-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--hx-space-2);
}


/* Migrated from hx-primitives.css — Dialog family (3.04.85) */
/* ---------- Dialog family ---------- */
.hx-modal {
	background: var(--hx-surface);
	color: var(--hx-fg);
	box-shadow: var(--hx-elev);
	border: 0;
	border-radius: var(--hx-radius-card);
}
.hx-modal__head { color: var(--hx-fg); }
.hx-modal__body,
.hx-modal__sub { color: var(--hx-fg-muted); }
.hx-modal--warn .hx-modal__head,
.hx-modal--warn .hx-modal__tone { color: var(--hx-warning); }
.hx-modal--error .hx-modal__head,
.hx-modal--error .hx-modal__tone { color: var(--hx-danger); }
.hx-modal--warn .hx-modal__foot .ws-button--primary {
	background: var(--hx-warning);
	border-color: var(--hx-warning);
	color: var(--hx-surface);
}
.hx-modal--error .hx-modal__foot .ws-button--primary {
	background: var(--hx-danger);
	border-color: var(--hx-danger);
	color: var(--hx-surface);
}
.hx-modal-stage { background: transparent; }
.hx-modal__bar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 8px;
}
.hx-modal__bar .hx-modal__head { margin: 0; }
.hx-modal__x {
	flex: none;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--hx-fg-muted);
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
}
.hx-modal__x:hover { background: var(--hx-surface-subtle); color: var(--hx-fg); }

html[data-ds-theme="light"] .hx-preview-card__stage,
html[data-theme="light"] .hx-preview-card__stage,
.hx-preview-card:not([data-theme="dark"]) .hx-preview-card__stage,
.hx-example:not([data-theme="dark"]) .hx-preview-card__stage,
.hx-example[data-theme="light"] .hx-example__stage,
html[data-ds-theme="light"] .hx-example__stage {
	background: var(--hx-surface);
}
/* SSOT: primitives/dropdown/dropdown.css owns .hx-dropdown__menu colors */
/* .hx-dropdown__menu {
	background: var(--hx-surface);
	color: var(--hx-fg);
	border-color: var(--hx-line);
	box-shadow: var(--hx-elev);
} */
.hx-dropdown__item { color: var(--hx-fg); }


/* Auto-migrated from hx-primitives.css (3.04.90) */
.hx-modal--warning {
	background: var(--hx-surface);
	color: var(--hx-fg);
}

/* Auto-migrated from hx-primitives.css (3.04.90) */
.hx-modal__tone { display: none; }

/* Auto-migrated from hx-primitives.css (3.04.90) */
.hx-modal--error .hx-modal__foot .ws-button--primary {
	background: var(--hx-danger);
	border-color: var(--hx-danger);
	color: var(--hx-surface);
}

/* Auto-migrated from hx-primitives.css (3.04.90) */
.hx-modal--warning .hx-modal__foot .ws-button--primary {
	background: var(--hx-warning);
	border-color: var(--hx-warning);
	color: var(--hx-surface);
}

/* Auto-migrated from hx-primitives.css (3.04.90) */
.hx-example[data-theme="dark"] .hx-modal {
  background: var(--hx-surface);
  color: var(--hx-fg);
  border-color: var(--hx-line);
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
}


/* 3.04.94 — 4-variant readiness (light/dark × desktop/mobile)
   Controlled by data-theme + data-hx-vp on <html>.
   All styles token-driven. Composition with other primitives encouraged. */
html[data-theme="light"][data-hx-vp="desktop"],
html[data-theme="light"][data-hx-vp="mobile"],
html[data-theme="dark"][data-hx-vp="desktop"],
html[data-theme="dark"][data-hx-vp="mobile"] {
  /* tokens flip automatically */
}


/* ========== MODAL ALERT (variant under Modal) ========== */
/* modal-alert */


/* Preview card — full width, content contained */
.hx-preview-card {
  width: 100%;
  max-width: 100%;
}
.hx-preview-card__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: auto;
}
