/* FM Embed promo banner (.embed_banner). Script: /assets/js/embed-banner.js
   The swap card mirrors the one in #brandstage on embed.html (fm-embed-demo.css),
   but all classes are prefixed with eb- so nothing leaks into or out of the page. */
/* Light by default; add .dark for dark pages: <section class="embed_banner dark"> */
.embed_banner {
    --eb-bg: #fff; --eb-panel: #fff; --eb-panel-border: rgba(36, 48, 52, .08);
    --eb-panel-shadow: 0 1px 2px rgba(36, 48, 52, .04), 0 32px 64px -40px rgba(36, 48, 52, .24);
    --eb-glow: rgba(22, 199, 176, .10); --eb-glow2: rgba(54, 98, 255, .06);
    --eb-title: #243034; --eb-text: rgba(36, 48, 52, .68);
    /* sits above decorative backgrounds of neighbouring sections (e.g. .tech::before) */
    position: relative; z-index: 4; padding: 80px 0; background: var(--eb-bg);
}
.embed_banner.dark {
    --eb-bg: #000; --eb-panel: #0c0c0e; --eb-panel-border: rgba(255, 255, 255, .08); --eb-panel-shadow: none;
    --eb-glow: rgba(22, 199, 176, .16); --eb-glow2: rgba(54, 98, 255, .10);
    --eb-title: #fff; --eb-text: rgba(255, 255, 255, .72);
}
.embed_banner .content { max-width: 1022px; }
.embed_banner .eb-in {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 56px; align-items: center;
    padding: 56px 56px 56px 64px; border-radius: 24px;
    background: var(--eb-panel); border: 1px solid var(--eb-panel-border); box-shadow: var(--eb-panel-shadow);
}
/* soft brand glow behind the text */
.embed_banner .eb-in::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(50% 70% at 0% 0%, var(--eb-glow), transparent 70%),
                radial-gradient(40% 60% at 45% 100%, var(--eb-glow2), transparent 70%);
}

/* text side */
.embed_banner .eb-label { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 24px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--eb-title); }
.embed_banner .eb-new { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #16C7B0; color: #fff; font-size: 11px; line-height: 1; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 0 0 4px rgba(22, 199, 176, .16); }
.embed_banner h2 { margin: 0 0 24px; font-size: 40px; line-height: 110%; font-weight: 400; letter-spacing: -.04em; color: var(--eb-title); }
.embed_banner .eb-text p { margin: 0 0 40px; max-width: 440px; font-size: 16px; line-height: 150%; color: var(--eb-text); }

/* brand stage: same design tokens as #brandstage */
.embed_banner .eb-stage {
    --canvas: rgba(245, 245, 245, 1); --surface: #fff; --surface-muted: rgba(36, 48, 52, .04); --control: rgba(36, 48, 52, .08);
    --text: rgba(36, 48, 52, 1); --text-muted: rgba(36, 48, 52, .52); --border: rgba(36, 48, 52, .12);
    --accent: rgba(22, 199, 176, 1); --accent-soft: rgba(22, 199, 176, .12); --pos: rgba(24, 189, 90, 1);
    --r-m: 8px; --r-l: 12px; --shadow: 0 4px 6px rgba(0, 0, 0, .04); --lim-used: rgba(36, 48, 52, .32);
    display: grid; place-items: center; gap: 14px; min-width: 420px; padding: 24px 16px 14px; border-radius: 18px;
    background: var(--canvas); transition: background .25s;
}
/* Finery theme on dark pages: dark surfaces instead of the light grey canvas */
.embed_banner.dark .eb-stage[data-b="finery"] { --canvas: rgba(255, 255, 255, .04); --surface: #161718; --surface-muted: rgba(255, 255, 255, .05); --control: rgba(255, 255, 255, .1); --text: #fff; --text-muted: rgba(255, 255, 255, .55); --border: rgba(255, 255, 255, .1); --shadow: none; --lim-used: rgba(255, 255, 255, .34); }
.embed_banner .eb-stage[data-b="northwind"] { --accent: #1d4ed8; --accent-soft: rgba(29, 78, 216, .1); --r-m: 4px; --r-l: 6px; --canvas: #eef2f7; --surface: #fff; --surface-muted: rgba(15, 23, 42, .045); --control: rgba(15, 23, 42, .08); --text: #0f172a; --text-muted: rgba(15, 23, 42, .55); --border: rgba(15, 23, 42, .14); --shadow: 0 1px 2px rgba(15, 23, 42, .1); }
.embed_banner .eb-stage[data-b="kadex"] { --accent: #7c3aed; --accent-soft: rgba(124, 58, 237, .12); --r-m: 14px; --r-l: 22px; --canvas: #f7f3ff; --surface: #fff; --surface-muted: rgba(76, 29, 149, .05); --control: rgba(76, 29, 149, .09); --text: #2e1065; --text-muted: rgba(46, 16, 101, .55); --border: rgba(76, 29, 149, .14); --shadow: 0 8px 24px rgba(76, 29, 149, .1); }
.embed_banner .eb-stage[data-b="solara"] { --accent: #ea580c; --accent-soft: rgba(234, 88, 12, .12); --r-m: 2px; --r-l: 3px; --canvas: #1c1917; --surface: #292524; --surface-muted: rgba(255, 255, 255, .05); --control: rgba(255, 255, 255, .1); --text: #fafaf9; --text-muted: rgba(250, 250, 249, .55); --border: rgba(255, 255, 255, .14); --pos: #4ade80; --shadow: none; --lim-used: rgba(255, 255, 255, .34); }

/* swap card (static picture of the widget) */
.embed_banner .eb-swap {
    position: relative; width: 100%; max-width: 400px; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); box-shadow: var(--shadow);
    color: var(--text); font-size: 14px; line-height: 18px; font-variant-numeric: tabular-nums; pointer-events: none; user-select: none;
    transition: background .25s, border-radius .25s, color .25s;
}
.embed_banner .eb-swap-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.embed_banner .eb-swap-h b { font-size: 18px; line-height: 24px; font-weight: 500; }
.embed_banner .eb-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; line-height: 16px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.embed_banner .eb-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pos); animation: eb-pulse 2s infinite; }
@keyframes eb-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.embed_banner .eb-box { padding: 12px 12px 12px 14px; border-radius: var(--r-m); background: var(--surface-muted); }
.embed_banner .eb-box-t { display: flex; justify-content: space-between; align-items: center; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.embed_banner .eb-box-t b { color: var(--text); font-weight: 500; }
.embed_banner .eb-box-r { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.embed_banner .eb-amt { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; font-size: 28px; line-height: 36px; letter-spacing: -.02em; }
.embed_banner .eb-asset { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-weight: 500; }
.embed_banner .eb-asset::after { content: ""; width: 5px; height: 5px; border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: rotate(45deg) translate(-2px, -1px); margin-left: 2px; }
.embed_banner .eb-ci { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font: 700 11px/1 Arial, sans-serif; flex: none; }
.embed_banner .eb-flip { justify-self: center; width: 32px; height: 32px; margin: -18px auto; z-index: 2; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; }
.embed_banner .eb-lim { padding: 10px 12px; border-radius: var(--r-m); background: var(--surface-muted); }
.embed_banner .eb-lim-t { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.embed_banner .eb-lim-t b { color: var(--text); font-weight: 500; font-size: 13px; }
.embed_banner .eb-lim-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--control); margin: 8px 0 7px; }
.embed_banner .eb-lim-bar i { display: block; height: 6px; }
.embed_banner .eb-u { background: var(--lim-used); }
.embed_banner .eb-n { background: var(--accent); }
.embed_banner .eb-lim-l { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; line-height: 14px; color: var(--text-muted); }
.embed_banner .eb-lim-l span { display: inline-flex; align-items: center; gap: 5px; }
.embed_banner .eb-lim-l i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.embed_banner .eb-lim-l b { color: var(--text); font-weight: 500; }
.embed_banner .eb-dl { margin: 6px 0 4px; display: grid; gap: 6px; font-size: 13px; }
.embed_banner .eb-dl div { display: flex; justify-content: space-between; gap: 12px; }
.embed_banner .eb-dl dt { color: var(--text-muted); }
.embed_banner .eb-dl dd { margin: 0; text-align: right; }
.embed_banner .eb-go { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: var(--r-m); background: var(--accent); color: #fff; font-weight: 500; }

/* brand switcher under the card */
.embed_banner .eb-brands { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.embed_banner .eb-brands button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--text-muted); font: inherit; font-size: 12px; cursor: pointer; transition: color .25s, border-color .25s; }
.embed_banner .eb-brands button i { width: 8px; height: 8px; border-radius: 50%; }
.embed_banner .eb-brands button.is-on { color: var(--text); border-color: var(--border); background: var(--surface); }

@media (prefers-reduced-motion: reduce) {
    .embed_banner .eb-live::before { animation: none; }
    .embed_banner .eb-stage, .embed_banner .eb-swap { transition: none; }
}
@media (max-width: 1100px) {
    .embed_banner .eb-in { padding: 48px 40px 48px 48px; gap: 40px; }
}
@media (max-width: 990px) {
    .embed_banner .eb-in { padding: 48px; gap: 32px; }
    .embed_banner .eb-stage { width: 100%; min-width: 0; max-width: 440px; justify-self: center; }
    .embed_banner .eb-in { grid-template-columns: minmax(0, 1fr); }
    /* order on tablet/mobile: label + headline, card, text, button */
    .embed_banner .eb-in { gap: 0; }
    .embed_banner .eb-text { display: contents; }
    .embed_banner .eb-label { order: 1; justify-self: start; }
    .embed_banner h2 { order: 2; margin-bottom: 24px; }
    .embed_banner .eb-stage { order: 3; margin-bottom: 24px; }
    .embed_banner .eb-text p { order: 4; max-width: none; }
    .embed_banner .eb-text .defb { order: 5; justify-self: start; }
}
@media (max-width: 600px) {
    .embed_banner { padding: 24px 0; }
    .embed_banner .eb-in { padding: 28px 16px 16px; border-radius: 20px; }
    .embed_banner h2 { font-size: 32px; }
    .embed_banner .eb-text p { font-size: 16px; margin-bottom: 24px; }
    .embed_banner .eb-text .defb { width: 100%; }
    .embed_banner .eb-stage { padding: 20px 12px 16px; }
    .embed_banner .eb-amt { font-size: 22px; }
}
