/* ============================================================================
   DAS BLOG SEARCH BOX — /ideas (under the H1, with topic chips) and every post
   (top of the rail at 961px+, a "Search guides" sheet below that)
   ----------------------------------------------------------------------------
   Port of ODNDR components/blog/search.module.css (odndr-web 0a4b7eb),
   2026-10-16: same layout and behaviour, DAS's skin. Jayden: "can you do this
   exact design for driver appreicaiton soltuisons aswell".

   COLOUR. The DAS custom properties are inverted (--black is white, --gold is
   navy), so every colour is an explicit hex and nothing here reads them. The
   palette is css/das-article.css's (.dav2): ink #0E1B2E, DAS navy #1A2E6E,
   darkest navy #0C1840, rule #DDE2EA, quiet panel #F4F6FA.
   Contrast (WCAG 2.2 AA): #5E6A7D on #fff 5.37:1, #1A2E6E on #fff 12.6:1,
   #1A2E6E on #E9EEF8 10.9:1, placeholder #6B7688 on #fff 4.59:1.

   Results and answers sit in the flow (no overlay), so nothing is clipped by
   the sticky rail and the page never scrolls sideways at 390px.
   ========================================================================== */
.bsx {
  --bsx-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bsx-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --bsx-ink: #0E1B2E; --bsx-body: #3B4658; --bsx-muted: #5E6A7D; --bsx-navy: #1A2E6E; --bsx-navy-2: #0C1840;
  --bsx-line: #DDE2EA; --bsx-soft: #F4F6FA; --bsx-tint: #E9EEF8;
  margin-top: 32px; max-width: 720px; font-family: var(--bsx-ui); color: var(--bsx-ink);
}
.bsx *, .bsx *::before, .bsx *::after { box-sizing: border-box; }
.bsx.compact { margin-top: 0; max-width: none; }
/* The rail copy: top of the rail, 961px and up (at 960 and under the header's Search button opens the sheet). */
.bsx-rail { margin: 0 0 22px; }
@media (max-width: 960px) { .bsx-rail { display: none; } }

.bsx-bar { position: relative; display: flex; align-items: center; gap: 8px; height: 56px; margin: 0; padding: 0 8px 0 18px; border: 1px solid #CDD3DC; border-radius: 999px; background: #FFFFFF; transition: border-color .15s, box-shadow .15s; }
.bsx-bar:focus-within { border-color: var(--bsx-navy); box-shadow: 0 0 0 3px rgba(26, 46, 110, .16); }
.compact .bsx-bar { height: 46px; padding: 0 6px 0 14px; }
.bsx-icon { flex: none; width: 19px; height: 19px; color: var(--bsx-muted); }
.bsx-input { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; font-family: var(--bsx-ui); font-size: 16px; font-weight: 500; color: var(--bsx-ink); }
.bsx-input::placeholder { color: #6B7688; font-weight: 500; font-size: 14.5px; opacity: 1; }
.bsx-input::-webkit-search-cancel-button { cursor: pointer; }
.compact .bsx-input { font-size: 15px; }
.bsx-kbd { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border: 1px solid var(--bsx-line); border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--bsx-muted); }
.bsx-ask { flex: none; height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--bsx-navy); color: #FFFFFF; font-family: var(--bsx-ui); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .15s; }
.bsx-ask:hover:not(:disabled) { background: var(--bsx-navy-2); }
.bsx-ask:disabled { background: #AEB7C5; cursor: default; }
.bsx-ask:focus-visible { outline: 2px solid var(--bsx-navy); outline-offset: 2px; }
.compact .bsx-ask { height: 34px; padding: 0 14px; font-size: 14px; }

/* Topic chips under the /ideas box: each fills the box with its topic. */
.bsx-chips { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.bsx-chip { height: 32px; padding: 0 14px; border: 1px solid #D5DCE6; border-radius: 999px; background: #FFFFFF; color: var(--bsx-body); font-family: var(--bsx-ui); font-size: 13.5px; font-weight: 600; line-height: 1; cursor: pointer; transition: background-color .15s, border-color .15s; }
.bsx-chip:hover { background: var(--bsx-soft); border-color: #C3CCD8; }
.bsx-chip[aria-pressed="true"] { background: var(--bsx-tint); border-color: transparent; color: var(--bsx-navy); }
.bsx-chip:focus-visible { outline: 2px solid var(--bsx-navy); outline-offset: 2px; }

.bsx-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.bsx-results { margin: 10px 0 0; padding: 6px; list-style: none; border: 1px solid var(--bsx-line); border-radius: 14px; background: #FFFFFF; display: grid; gap: 2px; }
.bsx-result { margin: 0; padding: 0; border-radius: 10px; }
.bsx-result::before { content: none !important; }
.bsx-result[aria-selected="true"] { background: var(--bsx-tint); }
.bsx-rlink { display: grid; gap: 3px; padding: 11px 14px; border-radius: 10px; text-decoration: none !important; color: var(--bsx-ink) !important; }
.bsx-rlink:hover { background: var(--bsx-soft); }
.bsx-rcat { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bsx-navy); }
.bsx-rtitle { font-size: 17px; line-height: 1.35; font-weight: 700; }
.compact .bsx-rtitle { font-size: 15px; }
.bsx-rsnip { font-size: 14px; line-height: 1.5; color: var(--bsx-body); }
.bsx-results mark { background: none; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(26, 46, 110, .45); text-underline-offset: 3px; }

/* The soft next step after every result list and every answer (data-cta search-demo / ask-demo). */
.bsx-next { display: inline-flex; align-items: center; gap: 6px; margin: 12px 4px 0; font-family: var(--bsx-ui); font-size: 14.5px; font-weight: 600; color: var(--bsx-navy) !important; text-decoration: none !important; }
.bsx-next span { transition: transform .15s; }
.bsx-next:hover { color: var(--bsx-navy-2) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.bsx-next:hover span { transform: translateX(3px); }
.bsx-next:focus-visible { outline: 2px solid var(--bsx-navy); outline-offset: 2px; border-radius: 4px; }

.bsx-none, .bsx-hint { margin: 12px 4px 0 !important; font-family: var(--bsx-ui) !important; font-size: 14.5px !important; line-height: 1.55 !important; color: var(--bsx-muted) !important; }
.bsx-linkbtn { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--bsx-navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bsx-label { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bsx-navy); }
.bsx-nomatch .bsx-label { margin: 14px 4px 0; }
.bsx-guides { margin: 12px 0 0 !important; padding: 0 !important; list-style: none; display: grid !important; gap: 6px !important; }
.bsx-nomatch .bsx-guides { margin-left: 4px !important; }
.bsx-guides li { margin: 0; padding: 0 !important; font-family: var(--bsx-ui) !important; }
.bsx-guides li::before { content: none !important; }
.bsx-guides a { font-size: 15px; line-height: 1.45; font-weight: 600; color: var(--bsx-navy) !important; text-decoration: underline; text-underline-offset: 3px; }
.bsx-guides a:hover { color: var(--bsx-navy-2) !important; }

/* Ask (off until DAS has its own Ask endpoint): the answer sits directly under the bar, above the results. */
.bsx-answerwrap:empty { display: none; }
.bsx-answerwrap { scroll-margin-top: 96px; }
.bsx-sheet .bsx-answerwrap { scroll-margin-top: 12px; }
.bsx-thinking { margin: 14px 4px 0; font-size: 14.5px; color: var(--bsx-muted); }
.bsx-answer { margin-top: 14px; padding: 22px 24px 20px; border-radius: 14px; background: var(--bsx-soft); border: 1px solid var(--bsx-line); }
.compact .bsx-answer { padding: 18px 18px 16px; }
.bsx-atext { margin: 10px 0 0 !important; font-family: var(--bsx-serif) !important; font-size: 18px !important; line-height: 1.6 !important; color: var(--bsx-ink) !important; }
.bsx-amsg { margin: 0 !important; font-size: 16px !important; line-height: 1.55 !important; color: var(--bsx-ink) !important; font-family: var(--bsx-ui) !important; }
.bsx-cite { margin-left: 1px; line-height: 0; }
.bsx-readnext { margin-top: 18px; }
.bsx-cite a { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #FFFFFF; border: 1px solid #CFDAE7; color: var(--bsx-navy); font: 700 11px/1 var(--bsx-ui); text-decoration: none; }
.bsx-sources { margin: 16px 0 0 !important; padding: 0 !important; list-style: none; display: grid !important; gap: 8px !important; }
.bsx-sources li { margin: 0; padding: 0 !important; font: 500 14.5px/1.45 var(--bsx-ui) !important; }
.bsx-sources li::before { content: none !important; }
.bsx-sources a { color: var(--bsx-ink); }
.bsx-disclaimer { margin: 18px 0 0 !important; padding-top: 14px; border-top: 1px solid var(--bsx-line); font: italic 13.5px/1.55 var(--bsx-ui) !important; color: var(--bsx-muted) !important; }
.bsx-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 14px 4px 0; padding: 0; border: 0; background: none; font-family: var(--bsx-ui); font-size: 14.5px; font-weight: 600; color: var(--bsx-navy); cursor: pointer; }
.bsx-toggle svg { width: 16px; height: 16px; transition: transform .15s; }
.bsx-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* At 960 and under: the article header's Search button and its full-width sheet. */
.bsx-sheetbtn { display: none; margin-left: 8px; vertical-align: middle; height: 28px; padding: 0 12px 0 10px; align-items: center; gap: 6px; border: 1px solid #D5DCE6; border-radius: 999px; background: #FFFFFF; color: #0E1B2E; font-family: 'Manrope', system-ui, sans-serif; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.bsx-sheetbtn svg { width: 15px; height: 15px; }
.bsx-sheetbtn:focus-visible { outline: 2px solid #1A2E6E; outline-offset: 2px; }
@media (max-width: 960px) { .bsx-sheetbtn { display: inline-flex; } }
.bsx-sheet { position: fixed; inset: 0; z-index: 10050; /* above the DAS nav and its drawer */ overflow-y: auto; padding: 14px 16px 32px; background: #FFFFFF; }
.bsx-sheethead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-family: 'Manrope', system-ui, sans-serif; }
.bsx-sheettitle { margin: 0; font-size: 17px; font-weight: 700; color: #0E1B2E; }
.bsx-sheetclose { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: #F4F6FA; color: #0E1B2E; cursor: pointer; }
.bsx-sheetclose svg { width: 18px; height: 18px; }
.bsx-sheetclose:focus-visible { outline: 2px solid #1A2E6E; outline-offset: 2px; }

@media (max-width: 680px) {
  .bsx { margin-top: 26px; }
  .bsx-bar { height: 52px; padding-left: 14px; }
  .bsx-kbd { display: none; }
  .bsx-ask { padding: 0 16px; }
  .bsx-answer { padding: 18px 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .bsx-bar, .bsx-ask, .bsx-chip, .bsx-next span, .bsx-toggle svg { transition: none; }
}
