/* Slim variant of the AI Studio banner: one short horizontal strip for wide page gaps.
 * Load after ai-studio-banner.css and add class "aisb--slim" to the section.
 * Layout: video | brand, title, feature pills | CTA.
 */
.aisb--slim {
  display: grid;
  grid-template-columns: 460px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 20px;
  margin-top: 0;
  padding: 0 28px 0 0;
  overflow: hidden;
  /* Dark surface so the video melts into the panel; the clips are dark at their right edge */
  --aisb-ink: #fff;
  --aisb-muted: #b4bdd6;
  --aisb-line: rgba(255, 255, 255, .16);
  --aisb-slim-bg: #0d1220;
  border-color: #1b2338;
  background: radial-gradient(520px 240px at 78% 10%, rgba(92, 86, 214, .26), transparent 70%), var(--aisb-slim-bg);
}

/* Video */
.aisb--slim .aisb-stage { align-self: stretch; aspect-ratio: auto; min-height: 197px; border-radius: 0; }
/* Fade the video's right edge into the panel */
.aisb--slim .aisb-stage::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(13, 18, 32, 0) 70%, rgba(13, 18, 32, .3) 82%, rgba(13, 18, 32, .78) 93%, var(--aisb-slim-bg) 100%);
}
.aisb--slim .aisb-pill { display: none; }
.aisb--slim .aisb-sound { left: 10px; right: auto; bottom: 10px; padding: 7px 12px; color: #141a26; font-size: 12px; }
.aisb--slim .aisb-sound[aria-pressed="true"] { color: #fff; }

/* End card: logo only at this size */
.aisb--slim .aisb-end-cta { display: none; }
.aisb--slim .aisb-end-logo img { width: 270px; max-width: 80%; }
.aisb--slim .aisb-end-tag { font-size: 14px; }

/* Copy */
.aisb--slim .aisb-slim-body { min-width: 0; }
.aisb--slim .aisb-brand { margin: 0 0 6px; color: #a9bcff; font-size: 14px; }
.aisb--slim .aisb-badge { background: rgba(255, 196, 120, .15); color: #ffd199; }
.aisb--slim .aisb-title { margin: 0 0 5px; font-size: 23px; line-height: 1.25; }
.aisb--slim .aisb-sub { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }

/* Feature pills replace the dark tab bar */
.aisb--slim .aisb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0; overflow: visible; border-radius: 0; background: none; }
.aisb--slim .aisb-tab {
  flex: none; flex-direction: row; align-items: center; gap: 6px;
  padding: 3px 12px 3px 3px; overflow: hidden;
  border: 1px solid var(--aisb-line); border-radius: 999px; background: rgba(255, 255, 255, .07); box-shadow: none;
}
.aisb--slim .aisb-tab + .aisb-tab::before { display: none; }
.aisb--slim .aisb-tab:hover { background: rgba(255, 255, 255, .14); }
.aisb--slim .aisb-ic { width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #d6def5; }
.aisb--slim .aisb-ic svg { width: 13px; height: 13px; }
.aisb--slim .aisb-tab b { margin: 0; color: var(--aisb-ink); font-size: 12.5px; white-space: nowrap; }
.aisb--slim .aisb-tab span.aisb-desc { display: none; }
.aisb--slim .aisb-tab[aria-selected="true"] { border-color: transparent; background: linear-gradient(100deg, #3a63d8, #7a4de0); }
.aisb--slim .aisb-tab[aria-selected="true"] b { color: #fff; }
.aisb--slim .aisb-tab[aria-selected="true"] .aisb-ic { background: rgba(255, 255, 255, .22); box-shadow: none; }
.aisb--slim .aisb-prog { top: auto; bottom: 0; height: 2px; background: rgba(255, 255, 255, .75); box-shadow: none; }

.aisb--slim .aisb-cta { grid-column: 3; grid-row: 1; align-self: center; }

/* Mid widths: drop the badge rather than let the brand row wrap and the strip grow */
@media (min-width: 961px) and (max-width: 1260px) {
  .aisb--slim { grid-template-columns: 370px minmax(0, 1fr) auto; column-gap: 14px; padding-right: 20px; }
  .aisb--slim .aisb-stage { min-height: 159px; }
  .aisb--slim .aisb-badge, .aisb--slim .aisb-sub, .aisb--slim .aisb-end-tag { display: none; }
  .aisb--slim .aisb-title { margin-bottom: 10px; font-size: 20px; }
  .aisb--slim .aisb-end-logo img { width: 210px; }
  .aisb--slim .aisb-sound { padding: 7px; }
  .aisb--slim .aisb-sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (max-width: 720px) {
  .aisb--slim { grid-template-columns: minmax(0, 1fr); row-gap: 12px; padding: 0 0 16px; }
  .aisb--slim .aisb-stage { aspect-ratio: 21 / 9; min-height: 0; }
  .aisb--slim .aisb-stage::after { background: linear-gradient(180deg, rgba(13, 18, 32, 0) 78%, var(--aisb-slim-bg) 100%); }
  .aisb--slim .aisb-slim-body { padding: 0 16px; }
  .aisb--slim .aisb-cta { grid-column: 1; grid-row: auto; justify-self: center; justify-content: center; width: calc(100% - 32px); margin-top: 0; }
}

@media (max-width: 480px) {
  .aisb--slim .aisb-tabs { flex-wrap: nowrap; }
  .aisb--slim .aisb-tab { flex: 1 1 0; justify-content: center; gap: 4px; padding: 3px 6px; }
  .aisb--slim .aisb-ic { width: 20px; height: 20px; }
  .aisb--slim .aisb-tab b { font-size: 11.5px; }
  .aisb--slim .aisb-sound { padding: 7px; }
  .aisb--slim .aisb-sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Product result pages */
.bdc-subpage .aisb--slim { margin: 24px 0 8px; }

/* Host pages style h2 and p globally; the banner copy must keep its own look */
.aisb--slim h2.aisb-title { color: #fff !important; font-size: 23px !important; font-weight: 800; }
.aisb--slim p.aisb-sub { color: #b4bdd6 !important; }
@media (min-width: 961px) and (max-width: 1260px) { .aisb--slim h2.aisb-title { font-size: 20px !important; } }

/* Quieter on host pages: no pulse on the sound button, weights closer to the surrounding copy */
.aisb--slim .aisb-sound { animation: none; box-shadow: none; font-weight: 600; }
.aisb--slim h2.aisb-title { font-weight: 700; }
.aisb--slim .aisb-brand, .aisb--slim .aisb-badge { font-weight: 600; }
.aisb--slim .aisb-tab b { font-weight: 600; }
.aisb--slim .aisb-cta { font-weight: 700; }

/* Even spacing on product result pages, whatever margins each language's page already had */
.bdc-subpage .aisb--slim { margin: 28px 0; }
.bdc-subpage .aisb--slim[data-placement$="_start"] { margin-bottom: 44px; }
.bdc-subpage .bdc-split-panel:has(~ .aisb--slim) { margin-bottom: 0 !important; }
.aisb--slim + script + script + br { display: none; }
.aisb--slim + script + script + section,
.aisb--slim + script + script + br + section { margin-top: 0 !important; }
.aisb--slim + script + script + section.bdc-section-sm { padding-top: 0 !important; }

/* Tablet widths: same layout as desktop on a smaller scale, CTA centred on the right */
@media (min-width: 721px) and (max-width: 960px) {
  .aisb--slim { grid-template-columns: clamp(220px, 32vw, 300px) minmax(0, 1fr) auto; column-gap: 14px; padding: 0 16px 0 0; }
  .aisb--slim .aisb-stage { min-height: 150px; }
  .aisb--slim .aisb-cta { padding: 10px 14px; font-size: 13px; }
  .aisb--slim .aisb-badge, .aisb--slim .aisb-sub, .aisb--slim .aisb-end-tag { display: none; }
  .aisb--slim h2.aisb-title { margin-bottom: 8px; font-size: 18px !important; }
  .aisb--slim .aisb-tab { padding: 4px 10px; }
  .aisb--slim .aisb-ic { display: none; }
  .aisb--slim .aisb-end-logo img { width: 170px; }
  .aisb--slim .aisb-sound { padding: 7px; }
  .aisb--slim .aisb-sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Same depth as the page's other panels (.bdc-split-panel) */
.aisb--slim { box-shadow: 0 24px 70px rgba(17, 24, 39, .09); }

/* Host pages recolor and underline every link on hover; the banner's links keep their own look */
.aisb--slim a.aisb-cta,
.aisb--slim a.aisb-cta:hover,
.aisb--slim a.aisb-cta:focus,
.aisb--slim a.aisb-cta:active,
.aisb--slim a.aisb-cta:visited,
.aisb--slim a.aisb-stage-link,
.aisb--slim a.aisb-stage-link:hover,
.aisb--slim a.aisb-stage-link:focus,
.aisb--slim a.aisb-stage-link:active,
.aisb--slim a.aisb-stage-link:visited { color: #fff !important; text-decoration: none !important; }

/* Host pages give buttons a large minimum height at narrow widths */
.aisb--slim button.aisb-sound { min-height: 0; line-height: 1; }
