/* SUMAI promo banner — plexiglass strip with a neon edge (PRO app + FREE app).
   Content comes from the admin "Banner" tab via /scripts/banner.php. */
.promo-banner {
  --pb: #23c7b1; --pb-ink: #0a766a;
  position: relative; display: flex; align-items: center; gap: 8px 18px;
  min-height: 30px; box-sizing: border-box;
  margin: 0; padding: 4px 12px 4px 20px;
  border-radius: 0; overflow: hidden;
  color: #f7f4ff;
  font: 300 12px/1.4 var(--fi, 'Inter', system-ui, sans-serif); letter-spacing: .02em;
  background: linear-gradient(115deg, rgba(255,255,255,.11) 0%, rgba(255,255,255,.04) 40%, rgba(255,255,255,.075) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
  border: 0; border-bottom: 1px solid rgba(255,255,255,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    inset 0 -1px 0 rgba(255,255,255,.05),
    -10px 0 28px -8px color-mix(in srgb, var(--pb) 55%, transparent),
    0 8px 20px -14px rgba(0,0,0,.6);
}
.promo-banner.pb-green  { --pb: #3ecf8e; --pb-ink: #17754d; }
.promo-banner.pb-gold   { --pb: #ffb820; --pb-ink: #9a6a00; }
.promo-banner.pb-violet { --pb: #a259ff; --pb-ink: #6d2fc7; }
.promo-banner.pb-pink   { --pb: #ff4d9f; --pb-ink: #b81e68; }
.promo-banner.pb-red    { --pb: #ff4d5e; --pb-ink: #c4202f; }
/* neon tube on the left edge */
.promo-banner::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 2px;
  background: var(--pb);
  box-shadow: 0 0 6px var(--pb), 0 0 16px var(--pb), 0 0 34px color-mix(in srgb, var(--pb) 70%, transparent);
}
/* soft light spill + specular sheen across the glass */
.promo-banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--pb) 20%, transparent) 0, transparent 90px),
    linear-gradient(105deg, transparent 0 32%, rgba(255,255,255,.09) 37%, transparent 45% 100%);
}
/* messages stack in one grid cell: the strip is as tall as the tallest message, no jumping */
.pb-stage { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; display: grid; }
.pb-slide { grid-area: 1 / 1; display: flex; align-items: center; gap: 8px 18px; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .55s ease, transform .55s ease, visibility 0s .55s; }
.pb-slide.on { opacity: 1; visibility: visible; transform: none; transition: opacity .55s ease, transform .55s ease; }
.pb-line { margin: 0; flex: 1 1 auto; min-width: 0; font-weight: 300; font-size: 12px; }
.pb-dots { position: relative; z-index: 1; flex: 0 0 auto; display: flex; gap: 0; align-items: center; }
.pb-dot { width: 10px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.pb-dot::before { content: ""; position: absolute; left: 2.5px; top: 8.5px; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.35); transition: background .25s, width .25s, box-shadow .25s; }
.pb-dot.on::before { background: var(--pb); box-shadow: 0 0 8px var(--pb); }
.pb-count { padding: 0 6px; height: 22px; border: 0; border-radius: 4px; background: transparent; color: rgba(255,255,255,.7); font: 400 10px/1 var(--fm, 'DM Mono', monospace); letter-spacing: .08em; cursor: pointer; }
.pb-count:hover { color: #fff; background: rgba(255,255,255,.1); }
.pb-count:focus-visible { outline: 2px solid #fff; }
html.light .pb-count { color: rgba(24,20,31,.7); }
.pb-pause { width: 22px; height: 22px; margin-left: 4px; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; position: relative; }
.pb-pause span { position: absolute; left: 8px; top: 6px; width: 3px; height: 10px; background: rgba(255,255,255,.6); box-shadow: 5px 0 0 rgba(255,255,255,.6); }
.pb-pause.is-paused span { left: 9px; width: 0; height: 0; background: none; box-shadow: none; border-left: 8px solid rgba(255,255,255,.7); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.pb-pause:hover span { background: #fff; box-shadow: 5px 0 0 #fff; }
.pb-pause.is-paused:hover span { background: none; box-shadow: none; border-left-color: #fff; }
.pb-pause:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
html.light .pb-pause span { background: rgba(24,20,31,.6); box-shadow: 5px 0 0 rgba(24,20,31,.6); }
html.light .pb-pause.is-paused span { background: none; box-shadow: none; border-left-color: rgba(24,20,31,.7); }
.pb-dot:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: 4px; }
.promo-banner b { font-weight: 500; color: color-mix(in srgb, var(--pb) 65%, #fff); }
.promo-banner i { font-style: italic; }
/* links inside a message take the accent colour of the banner (the button has its own style) */
.promo-banner .pb-line a { color: var(--pb); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--pb) 55%, transparent); }
.promo-banner .pb-line a:hover { color: #fff; text-decoration-color: var(--pb); }
.pb-cta {
  position: relative; z-index: 1; flex: 0 0 auto;
  font: 400 10px/1 var(--fm, 'DM Mono', monospace); letter-spacing: .12em; text-transform: uppercase;
  color: #fff !important; text-decoration: none !important;
  padding: 5px 10px; border-radius: 4px;
  border: 1px solid var(--pb); background: color-mix(in srgb, var(--pb) 16%, transparent);
  box-shadow: 0 0 14px -4px var(--pb);
  transition: background .2s, box-shadow .2s;
}
.pb-cta:hover { background: color-mix(in srgb, var(--pb) 34%, transparent); box-shadow: 0 0 20px -2px var(--pb); }
.pb-cta:focus-visible, .pb-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pb-x {
  position: relative; z-index: 1; flex: 0 0 auto;
  width: 22px; height: 22px; margin: 0; padding: 0; border: 0; border-radius: 4px; align-self: center;
  background: transparent; color: rgba(255,255,255,.75); font: 300 16px/1 var(--fi, Inter, sans-serif); cursor: pointer;
}
.pb-x:hover { color: #fff; background: rgba(255,255,255,.1); }
@media (max-width: 640px) {
  .promo-banner { padding: 4px 8px 4px 16px; }
  .pb-line { font-size: 11.5px; }
  .pb-slide { flex-wrap: nowrap; gap: 4px 8px; }
  .pb-cta { padding: 4px 7px; font-size: 9px; letter-spacing: .08em; }
}
/* very narrow phones: button drops under the text again, otherwise the text column gets too thin */
@media (max-width: 360px) { .pb-slide { flex-wrap: wrap; } }
/* light theme: glass over a light page — darker ink, regular weight */
html.light .promo-banner {
  color: #1d1826; font-weight: 400;
  background: linear-gradient(115deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,.55) 45%, rgba(255,255,255,.75) 100%);
  border-color: rgba(24,20,31,.14);
  box-shadow: inset 0 1px 0 #fff, -8px 0 24px -10px color-mix(in srgb, var(--pb) 70%, transparent), 0 10px 26px -16px rgba(24,20,31,.4);
}
html.light .promo-banner b { color: #000; }
html.light .pb-line { font-weight: 500; }
html.light .promo-banner .pb-line a { color: var(--pb-ink); }
html.light .promo-banner .pb-line a:hover { color: #000; }
html.light .pb-dot::before { background: rgba(24,20,31,.28); }
html.light .pb-dot.on::before { background: var(--pb-ink); box-shadow: none; }
html.light .pb-cta { color: #18141f !important; border-color: var(--pb-ink); background: color-mix(in srgb, var(--pb) 22%, #fff); box-shadow: none; }
html.light .pb-x { color: rgba(24,20,31,.65); }
html.light .pb-x:hover { color: #000; background: rgba(24,20,31,.08); }
@media (prefers-reduced-motion: reduce) { .pb-slide, .pb-slide.on { transform: none; } }
/* "reduce transparency": drop the blur, keep the tinted glass look */
@media (prefers-reduced-transparency: reduce) {
  .promo-banner { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(115deg, rgba(52,45,72,.92), rgba(30,26,44,.9)); }
  html.light .promo-banner { background: linear-gradient(115deg, rgba(255,255,255,.96), rgba(244,242,248,.94)); }
}

/* public website: strip is fixed at the very top, above the fixed menu, and stays while scrolling */
.promo-banner.pb-site { position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 60; }
body.has-pb-site { padding-top: var(--pb-site-h, 0px); }
.promo-banner.pb-sticky { position: sticky; top: 0; z-index: 49; }

/* the message text takes the accent colour of the banner (yellow banner = yellow letters, green = green) */
.promo-banner .pb-line { color: var(--pb); }
/* same size everywhere (app, Home, PRO page, FAQ, Updates): page stylesheets must not make it bigger */
.promo-banner .pb-line, .promo-banner .pb-line * { font-size: 10.7px !important; line-height: 1.4 !important; letter-spacing: .02em; }
/* phones: message text 2 pt smaller (12px -> 10px) */
@media (max-width: 640px) { .promo-banner .pb-line, .promo-banner .pb-line * { font-size: 10px !important; } }
html.light .promo-banner .pb-line, html.light .promo-banner b { color: var(--pb-ink); }

/* calm at rest: the whole strip (glass, text, button, glow) is 30% darker; hover / keyboard focus lights it up to the full look */
.promo-banner { filter: brightness(.7); transition: filter .35s ease; }
.promo-banner:hover, .promo-banner:focus-within { filter: none; }
@media (prefers-reduced-motion: reduce) { .promo-banner { transition: none; } }

/* public website banner: capitals on every page, set here so no page stylesheet decides it */
.promo-banner.pb-site .pb-line, .promo-banner.pb-site .pb-line * { text-transform: uppercase; }

/* website: the strip's height is reserved in <head> from the last visit, so the page does not jump when the strip arrives */
html.pb-pre body { padding-top: var(--pb-site-h, 0px); }
html.pb-pre .landing-header { top: var(--pb-site-h, 0px); }

/* layout: text on the left, then the dots, then the button at the far right (then the X).
   Slides are "contents" so every message's text / button share the same grid cells; the button column is as wide as the widest button. */
.promo-banner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; column-gap: 0; row-gap: 4px; align-items: center; }
.pb-stage, .pb-slide { display: contents; }
/* (visibility is set on the children: a display:contents slide has no box, so its own transition never runs) */
.pb-slide > * { opacity: 0; visibility: hidden; transition: opacity .55s ease, visibility 0s .55s; }
.pb-slide.on > * { opacity: 1; visibility: visible; transition: opacity .55s ease; }
.pb-line { grid-column: 1; grid-row: 1; }
.pb-dots { grid-column: 2; grid-row: 1; margin-left: 14px; }
.pb-cta { grid-column: 3; grid-row: 1; justify-self: end; margin-left: 12px; }
.pb-x { grid-column: 4; grid-row: 1; margin-left: 6px; }
/* very narrow phones: the button goes under the text, left-aligned */
@media (max-width: 360px) {
  .promo-banner { grid-template-columns: minmax(0, 1fr) auto auto; }
  .pb-cta { grid-column: 1; grid-row: 2; justify-self: start; margin-left: 0; }
  .pb-x { grid-column: 3; }
}
@media (prefers-reduced-motion: reduce) { .pb-slide > *, .pb-slide.on > * { transition: none; } }
