/* -------------------------------------------------------------------------
 * Design tokens
 * Taken verbatim from the design_references mockups so ports stay faithful.
 * ------------------------------------------------------------------------- */

:root {
  --blue: #354ec1;
  --text: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --bg: #F9FAFB;
  --white: #FFFFFF;
  --green: #49b034;
}

/* -------------------------------------------------------------------------
 * Reset
 * ------------------------------------------------------------------------- */

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

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* -------------------------------------------------------------------------
 * Primary button
 * ------------------------------------------------------------------------- */

.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.btn-primary:hover {
  opacity: 0.92;
}

/* -------------------------------------------------------------------------
 * Demo landing page
 * Dev-only wrapper for the "Start checkout (demo)" page. Not a mockup port.
 * ------------------------------------------------------------------------- */

.demo-wrap {
  max-width: 600px;
  margin: 80px auto;
  padding: 0 20px;
  text-align: center;
}

.demo-wrap h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.demo-wrap .brand-descriptor {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.demo-wrap .store-meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 16px;
}

/* Step-specific styles live in their own files (step1.css, step2.css, ...)
   and are loaded via content_for :stylesheets on each page. */

/* Reserve space at the viewport bottom when the welcome-offer sticky
   bar is visible, so it doesn't overlap footer content. Toggled on the
   <body> element by welcome_offer_controller. */
body.has-welcome-sticky { padding-bottom: 90px; }

/* -------------------------------------------------------------------------
 * Shared footer-policy modal. Used on step 1, step 2, and the thank-you
 * page — included via checkout/shared/_policy_modal.
 * ------------------------------------------------------------------------- */

.policy-modal {
  position: fixed; inset: 0;
  background: rgba(17, 24, 39, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: policyFadeIn 0.2s ease;
}
.policy-modal-panel {
  background: white; border-radius: 12px;
  width: 100%; max-width: 560px;
  max-height: 80vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: policySlideUp 0.2s ease;
}
.policy-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.policy-modal-title {
  font-size: 16px; font-weight: 600; color: var(--text); margin: 0;
}
.policy-modal-close {
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 6px;
  font-size: 24px; line-height: 1; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.policy-modal-close:hover { background: var(--bg); color: var(--text); }
.policy-modal-body {
  padding: 18px 20px 24px; overflow-y: auto;
  font-size: 13.5px; line-height: 1.6; color: var(--text-secondary);
}
.policy-modal-section p { margin-bottom: 12px; }
.policy-modal-section p:last-child { margin-bottom: 0; }
.policy-modal-section h3 {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin: 16px 0 8px;
}

@keyframes policyFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes policySlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
