/*
 * satellite-common.css — shared brand tokens + base styles for satellite pages
 * (payment-request.html, booking.html).
 *
 * v3.1.0 (Phase 1 of v5.0.0 roadmap):
 *   - Added canonical .sat-toast component (replaces 5 per-page toast implementations)
 *
 * Tokens + .sr-only live in css/tokens.css — must be imported before this file.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  font-family: var(--font-body, 'Inter', system-ui, -apple-system, sans-serif);
  color: var(--text);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

/* ── Shared button primitives ─────────────────────────────────
   Pages may extend with `.btn-primary`, `.btn-ghost`, etc. */
.sat-btn {
  padding: 11px 20px;
  border-radius: var(--radius-md, 8px);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background var(--duration-fast, 0.15s),
              color var(--duration-fast, 0.15s),
              border-color var(--duration-fast, 0.15s),
              opacity var(--duration-fast, 0.15s);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sat-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sat-btn-primary { background: var(--primary-500, var(--cyan)); color: #fff; }
.sat-btn-primary:hover:not(:disabled) { background: var(--primary-700, var(--indigo-dark)); }
.sat-btn-ghost { background: transparent; color: var(--text-muted, var(--muted)); }
.sat-btn-ghost:hover { color: var(--text-primary, var(--text)); }
/* Bordered ghost variant used by .sat-modal-cancel */
.sat-modal .sat-btn-ghost {
  background: var(--neutral-0, #fff);
  color: var(--text, var(--text-primary));
  border-color: var(--border, var(--neutral-300));
}
.sat-modal .sat-btn-ghost:hover { border-color: var(--neutral-300, var(--border)); }

/* v5.1: size modifiers — match .btn--xs/sm/md/lg/xl per Figma UI-Components */
.sat-btn--xs { padding: 6px 12px; font-size: 12px; }
.sat-btn--sm { padding: 8px 14px; font-size: 13px; }
.sat-btn--md { padding: 11px 20px; font-size: 14px; }   /* default */
.sat-btn--lg { padding: 12px 22px; font-size: 15px; }
.sat-btn--xl { padding: 14px 26px; font-size: 16px; }

/* ── Canonical toast (shared via Satellite.showToast) ─────────
   Variants set via [data-kind] attribute (default | success | error | warning). */
.sat-toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-6, 24px);
  transform: translate(-50%, 12px);
  background: #111827;
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md, 8px);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(15, 23, 42, 0.18));
  opacity: 0;
  pointer-events: none;
  z-index: var(--z-toast, 1000);
  transition: opacity var(--duration-base, 0.2s) var(--ease-decelerate, ease),
              transform var(--duration-base, 0.2s) var(--ease-decelerate, ease);
  max-width: min(90vw, 480px);
  text-align: center;
}
.sat-toast--show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.sat-toast[data-kind="success"] { background: var(--success, #10B981); }
.sat-toast[data-kind="error"]   { background: var(--danger,  #EF4444); }
.sat-toast[data-kind="warning"] { background: var(--warning, #F59E0B); color: #1B1C1D; }

/* ── Confirm modal (Satellite.confirm) ───────────────────────── */
.sat-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 10, 30, 0.5);
  backdrop-filter: blur(4px);
  animation: sat-modal-fade 0.2s ease-out;
}
.sat-modal {
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 14px;
  background: var(--neutral-0, #fff);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  animation: sat-modal-rise 0.2s ease-out;
}
.sat-modal-title {
  font-family: var(--font-display, var(--font-body, 'Inter', sans-serif));
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text, var(--text-primary));
  overflow-wrap: anywhere;
}
.sat-modal-body {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body, var(--text-secondary));
  overflow-wrap: anywhere;
}
.sat-modal-list {
  margin-top: 12px;
  padding-left: 20px;
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body, var(--text-secondary));
}
.sat-modal-list li { overflow-wrap: anywhere; }
.sat-modal-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column-reverse;   /* OK on top when stacked */
  gap: 8px;
}
.sat-modal-actions .sat-btn {
  min-height: 44px;
  width: 100%;
  justify-content: center;
}
.sat-modal-actions .sat-btn:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}
@media (min-width: 400px) {
  .sat-modal-actions { flex-direction: row; justify-content: flex-end; }
  .sat-modal-actions .sat-btn { width: auto; }
}
@keyframes sat-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sat-modal-rise { from { transform: translateY(10px); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .sat-modal-overlay, .sat-modal { animation: none; }
}
