/* =============================================================================
 * Sunset Music Festivals — demo storefront styling
 * ========================================================================== */
:root {
  --sun-orange: #ff5a1f;
  --sun-pink: #ff2e83;
  --sun-purple: #7b2ff7;
  --ink: #1a1a1a;
  --ink-soft: #4a4a55;
  --muted: #8a8a96;
  --line: #e7e7ee;
  --bg: #fbf7f4;
  --card: #ffffff;
  --ok: #16a34a;
  --ok-tint: #f0fdf4;
  --shadow: 0 10px 40px rgba(40, 20, 60, 0.08);
  --shadow-sm: 0 2px 10px rgba(40, 20, 60, 0.06);
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(255, 46, 131, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(123, 47, 247, 0.10), transparent 55%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(115deg, var(--sun-purple), var(--sun-pink) 55%, var(--sun-orange));
  color: #fff;
  padding: 18px 24px;
  box-shadow: var(--shadow-sm);
}
.site-header .wrap {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  display: grid; place-items: center; font-size: 18px;
  backdrop-filter: blur(4px);
}
.header-meta { font-size: 13px; opacity: 0.92; display: flex; gap: 18px; align-items: center; }
.header-meta .secure::before { content: '🔒 '; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
main { max-width: 1080px; margin: 0 auto; padding: 28px 24px 64px; }

.demo-strip {
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center;
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 24px;
}
.demo-strip strong { color: #7c2d12; }
.demo-strip code { background: #ffedd5; padding: 1px 6px; border-radius: 6px; font-size: 12px; }

.grid {
  display: grid; grid-template-columns: 1.25fr 0.95fr; gap: 28px; align-items: start;
}
@media (max-width: 880px) { .grid { grid-template-columns: 1fr; } }

/* ── Product ─────────────────────────────────────────────────────────────── */
.product { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.product .stage {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(380px 200px at 70% 120%, rgba(255, 200, 80, 0.55), transparent 70%),
    linear-gradient(180deg, #2a1357 0%, #7b2ff7 42%, #ff2e83 72%, #ff8a3d 100%);
  position: relative; display: grid; place-items: end center;
}
.product .stage .sun {
  position: absolute; bottom: 22%; left: 50%; transform: translateX(-50%);
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fff3c4, #ffd166 55%, #ff8a3d);
  box-shadow: 0 0 60px rgba(255, 209, 102, 0.7);
}
.product .stage .skyline {
  position: absolute; bottom: 0; left: 0; right: 0; height: 34%;
  background: repeating-linear-gradient(90deg, #160a2e 0 16px, #1f0f3d 16px 30px);
  -webkit-mask: linear-gradient(180deg, transparent, #000 40%);
          mask: linear-gradient(180deg, transparent, #000 40%);
  clip-path: polygon(0 60%, 6% 40%, 12% 62%, 19% 30%, 26% 60%, 33% 45%, 41% 64%, 48% 28%, 56% 58%, 64% 42%, 72% 62%, 80% 34%, 88% 60%, 95% 44%, 100% 62%, 100% 100%, 0 100%);
}
.product .stage .tag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  background: rgba(0, 0, 0, 0.42); color: #fff; backdrop-filter: blur(6px);
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.product .body { padding: 22px 24px 26px; }
.eyebrow { color: var(--sun-pink); font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.product h1 { margin: 8px 0 6px; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; }
.product .venue { color: var(--ink-soft); font-size: 14px; margin: 0 0 16px; }
.product .venue b { color: var(--ink); }
.price-row { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 14px; }
.price { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.price .cur { font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.per { color: var(--muted); font-size: 13px; }
.blurb { color: var(--ink-soft); font-size: 14px; line-height: 1.6; margin: 0; }
.perks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.perks li { font-size: 13.5px; color: var(--ink-soft); display: flex; gap: 9px; align-items: center; }
.perks li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sun-orange); flex: none; }

/* ── Checkout card ───────────────────────────────────────────────────────── */
.checkout { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 24px; position: sticky; top: 20px; }
.checkout h2 { margin: 0 0 4px; font-size: 17px; }
.checkout .sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

.line { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: 14px; color: var(--ink-soft); }
.line .qty { color: var(--muted); font-size: 12px; }
.line.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 14px; font-size: 17px; font-weight: 800; color: var(--ink); }
.line.protection { color: var(--ok); font-weight: 600; }

.section-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin: 18px 0 10px; display: flex; align-items: center; justify-content: space-between; }

/* Widget host: theme it via inherited --widget-* custom properties.
   These cross the widget's CLOSED shadow root because custom properties inherit,
   and an outer-document rule on the host overrides the widget's :host defaults. */
claimful-widget {
  display: block;
  --widget-primary: #ff5a1f;
  --widget-bg: #ffffff;
  --widget-text: #1a1a1a;
  --widget-border: #ececf2;
  --widget-muted: #8a8a96;
  --widget-radius: 12px;
  --widget-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --widget-success: #16a34a;
  --widget-success-tint: #f0fdf4;
}
.widget-frame { border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: #fcfcfe; }

.protection-status { font-size: 12.5px; color: var(--muted); margin: 10px 2px 0; min-height: 16px; }
.protection-status.is-on { color: var(--ok); font-weight: 600; }
.protection-status.is-off { color: var(--ink-soft); }

.pay-btn {
  width: 100%; margin-top: 18px; border: none; cursor: pointer;
  background: linear-gradient(115deg, var(--sun-pink), var(--sun-orange));
  color: #fff; font-weight: 700; font-size: 15.5px; padding: 15px;
  border-radius: 12px; letter-spacing: 0.01em;
  box-shadow: 0 8px 20px rgba(255, 90, 31, 0.28);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.pay-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(255, 90, 31, 0.36); }
.pay-btn:active { transform: translateY(0); }
.pay-note { text-align: center; color: var(--muted); font-size: 11.5px; margin-top: 10px; }

/* ── Demo console (event feed) ───────────────────────────────────────────── */
.console { margin-top: 28px; background: #14121c; color: #e8e6f2; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.console .bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #1c1930; border-bottom: 1px solid #2a263f; }
.console .bar .title { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.console .bar .title .glow { color: var(--sun-orange); }
.state-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.02em; }
.state-badge-muted { background: #2a263f; color: #b7b3cc; }
.state-badge-offer { background: rgba(255, 90, 31, 0.16); color: #ffb38a; }
.state-badge-accepted { background: rgba(22, 163, 74, 0.18); color: #7ee2a4; }
.state-badge-error { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }

.feed { max-height: 280px; overflow: auto; padding: 8px 0; font-family: 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace; font-size: 12px; }
.feed-row { display: flex; gap: 9px; align-items: baseline; padding: 6px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.feed-dot { width: 7px; height: 7px; border-radius: 50%; background: #6b6688; flex: none; align-self: center; }
.feed-time { color: #6f6a8a; flex: none; }
.feed-label { color: #e8e6f2; font-weight: 600; }
.feed-meta { color: #9b96b8; }
.feed-ready .feed-dot { background: #60a5fa; }
.feed-changed .feed-dot { background: #a78bfa; }
.feed-offer .feed-dot, .feed-api .feed-dot { background: var(--sun-orange); }
.feed-accepted .feed-dot, .feed-protected .feed-dot { background: #34d399; }
.feed-declined .feed-dot { background: #fbbf24; }
.feed-error .feed-dot { background: #f87171; }
.feed-store .feed-dot { background: #94a3b8; }
.feed-protected .feed-label, .feed-accepted .feed-label { color: #7ee2a4; }
.feed-error .feed-label { color: #fca5a5; }

/* ── Order complete (success) view ───────────────────────────────────────── */
#view-complete { max-width: 680px; margin: 0 auto; }
.success-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 32px; text-align: center; }
.success-card .check { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 18px; background: var(--ok-tint); color: var(--ok); display: grid; place-items: center; font-size: 32px; }
.success-card h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.02em; }
.success-card .lead { color: var(--ink-soft); font-size: 15px; margin: 0 0 4px; }
.success-card .ordernum { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.success-card .ordernum b { color: var(--ink); font-family: ui-monospace, Menlo, monospace; }

.prot-card { text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: linear-gradient(180deg, #fff, #fffaf6); margin: 8px 0 0; }
.prot-card .head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.prot-card .head .pill { background: var(--ok-tint); color: var(--ok); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.prot-card .head h3 { margin: 0; font-size: 16px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; color: var(--ink); font-weight: 600; }
.kv dd.ref { font-family: ui-monospace, Menlo, monospace; color: var(--sun-orange); font-size: 15px; }
.email-note { display: flex; gap: 12px; align-items: flex-start; text-align: left; margin-top: 18px; padding: 14px 16px; background: #f6f4ff; border: 1px solid #e6e0ff; border-radius: 12px; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.email-note .ico { font-size: 18px; flex: none; }
.email-note a { color: var(--sun-purple); font-weight: 600; }
.noprot { color: var(--ink-soft); font-size: 14px; background: #f7f7fb; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }

.linkbtn { display: inline-block; margin-top: 24px; background: none; border: 1px solid var(--line); color: var(--ink-soft); padding: 11px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.linkbtn:hover { border-color: var(--sun-orange); color: var(--sun-orange); }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }
footer code { background: #efeaff; color: #5b21b6; padding: 1px 6px; border-radius: 5px; }
