/* Aimer web v2 — shell styles (commerce area owns this file): skip link, load bar, toast, shared states.
   Design tokens come from base.css (foundation area). The var() fallbacks keep the shell usable before
   base.css lands; they are the design's own values (pink #E4127A, ink #1C1B18, Bricolage Grotesque). */
:root {
  --w2-pink: var(--pink, #E4127A);
  --w2-pink-hover: var(--pink-h, #b40e60);
  --w2-ink: var(--ink, #1c1b18);
  --w2-ink-2: var(--ink-2, #4b4943);
  --w2-muted: var(--muted, #706d65);
  --w2-line: var(--line, #dededb);
  --w2-soft: var(--field, #f0f0ee);
  --w2-font: var(--font, 'Bricolage Grotesque', sans-serif);
  --w2-mono: var(--mono, 'Space Mono', monospace);
}
html, body { margin: 0; }
body { font-family: var(--w2-font); color: var(--w2-ink); background: #fff; -webkit-font-smoothing: antialiased; }
#w2-main { outline: none; }
#w2-main:focus-visible { outline: none; }
.w2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.w2-skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 10000; background: var(--w2-ink); color: #fff;
  padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.w2-skip:focus { top: 12px; }

#w2-loadbar { position: fixed; top: 0; inset-inline-start: 0; height: 3px; width: 0; background: var(--w2-pink); z-index: 9999; opacity: 0;
  transition: width .4s ease, opacity .3s ease; }
#w2-loadbar.go { width: 70%; opacity: 1; }
#w2-loadbar.done { width: 100%; opacity: 0; }

.w2-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 9998; background: var(--w2-ink); color: #fff;
  padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 18px 40px -18px rgba(28,27,24,.5); max-width: calc(100vw - 32px); }

/* ---- shared states (design screen "States", R2: exact values) ---- */
.w2-state { display: flex; justify-content: center; padding: 56px var(--gut, 32px) 72px; min-height: 40vh; line-height: normal; }
.w2-state__card { width: 100%; max-width: 420px; background: #fff; border: 1px solid #dededb; border-radius: 18px; padding: 44px 32px; text-align: center; align-self: flex-start; }
.w2-state__icon { width: 72px; height: 72px; border-radius: 22px; background: rgba(228,18,122,.07); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.w2-state__icon svg { width: 30px; height: 30px; color: var(--w2-pink); }
.w2-state--error .w2-state__icon { background: rgba(192,57,43,.07); }
.w2-state--error .w2-state__icon svg { color: #c0392b; }
.w2-state__title { font-size: 19px; font-weight: 700; letter-spacing: -.025em; color: var(--w2-ink); margin: 0; }
.w2-state__text { font-size: 13.5px; color: var(--muted, #706d65); line-height: 1.65; margin: 10px auto 0; max-width: 340px; }
.w2-state__btn { display: inline-flex; align-items: center; gap: 9px; margin-top: 22px; background: var(--w2-pink); color: #fff; border: 0; border-radius: 13px; padding: 14px 22px;
  font: 700 13.5px var(--w2-font); cursor: pointer; text-decoration: none; }
.w2-state__btn:hover { background: var(--w2-pink-hover); color: #fff; }
.w2-state__btn--dark { background: var(--w2-ink); }
.w2-state__btn--dark:hover { background: #000; }
@media (max-width: 699px) { .w2-state { padding-top: 32px; } .w2-state__card { padding: 36px 22px; } }
/* loading: shimmer skeleton, sweeps left to right, 1.4 s linear (design) */
.w2-sk-wrap { padding: 32px var(--gut, 32px) 72px; min-height: 40vh; }
.w2-sk { display: block; border-radius: 8px; background: linear-gradient(90deg,#ececea 25%,#f6f6f5 50%,#ececea 75%); background-size: 200% 100%; animation: w2shim 1.4s linear infinite; }
[dir="rtl"] .w2-sk { animation-direction: reverse; }
.w2-sk-wrap i { display: block; }
.w2-sk-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.w2-sk-cols { display: flex; gap: 32px; align-items: flex-start; }
.w2-sk-main { flex: 1.6; min-width: 0; background: #fff; border: 1px solid #dededb; border-radius: 18px; padding: 0 24px; }
.w2-sk-line { display: flex; gap: 18px; padding: 22px 0; align-items: flex-start; }
.w2-sk-line + .w2-sk-line { border-top: 1px solid #dededb; }
.w2-sk-col { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.w2-sk-rail { flex: 1; min-width: 0; background: #fff; border: 1px solid #dededb; border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.w2-sk-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.w2-sk-card { background: #fff; border: 1px solid #dededb; border-radius: 16px; padding: 14px; }
.w2-sk-row { display: flex; align-items: center; justify-content: space-between; }
.w2-sk-btn { width: 36px; height: 36px; border-radius: 11px; background: #dededb; }
@keyframes w2shim { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (max-width: 1099px) { .w2-sk-cols { flex-direction: column; } .w2-sk-main, .w2-sk-rail { width: 100%; flex: none; } .w2-sk-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 699px) { .w2-sk-wrap { padding-top: 20px; } .w2-sk-main { padding: 0 16px; } .w2-sk-line > .w2-sk:first-child { width: 84px !important; height: 84px !important; } }
@media (prefers-reduced-motion: reduce) { .w2-sk { animation: none; } }
/* process spinner (payment confirmation only, not content) */
.w2-spinner { display: block; width: 36px; height: 36px; margin: 0 auto 20px; border-radius: 50%; border: 3px solid #dededb; border-top-color: var(--w2-pink); animation: w2spin .8s linear infinite; }
@keyframes w2spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .w2-spinner { animation-duration: 2.4s; } #w2-loadbar { transition: none; } }

/* minimal buttons until base.css provides .btn styles; areas may use either */
.w2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--w2-font); font-weight: 700; font-size: 15px;
  padding: 14px 24px; border-radius: 100px; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1; }
.w2-btn--primary { background: var(--w2-pink); color: #fff; }
.w2-btn--primary:hover { background: var(--w2-pink-hover); }
.w2-btn--dark { background: var(--w2-ink); color: #fff; }
.w2-btn--ghost { background: #fff; color: var(--w2-ink); border-color: var(--w2-line); }
.w2-btn:disabled { opacity: .55; cursor: default; }
.w2-btn:focus-visible, .w2-skip:focus-visible { outline: 3px solid rgba(228,18,122,.35); outline-offset: 2px; }
