/*
 * Shared chrome (user-journeys UJ-0 / UJ-2, 2026-11-16): the pieces every page can use.
 *   (the page header moved to discanvis-theme.css with the page shell, docs/PAGE_SHELL.md)
 *   .dcv-next-steps    the end of an answer: <= 3 links    (Elements/_next_steps.html)
 *   .dcv-search-menu   the suggestions under the search box (static/pages/All/js/site_search.js)
 * Sizes come from the page-type scale (discanvis-theme.css, --dcv-fs-*).
 */

/* ------------------------------------------------------------ next steps */
.dcv-next-steps {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--dcv-s2, .5rem) var(--dcv-s3, .75rem);
    margin-top: var(--dcv-s4, 1rem); padding-top: var(--dcv-s3, .75rem);
    border-top: 1px solid var(--bs-border-color);
}
.dcv-next-steps ul { display: contents; margin: 0; padding: 0; list-style: none; }
.dcv-next-steps li { list-style: none; }
.dcv-next-steps .dcv-kicker { margin-right: var(--dcv-s1, .25rem); }
.dcv-next-steps a {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .75rem; border: 1px solid var(--bs-border-color); border-radius: 999px;
    font-size: var(--dcv-fs-body, .875rem); font-weight: 500; text-decoration: none;
    color: var(--bs-body-color); background: var(--bs-body-bg);
    transition: border-color .15s, color .15s;
}
.dcv-next-steps a:hover, .dcv-next-steps a:focus-visible { border-color: var(--bs-primary); color: var(--bs-primary); }
.dcv-next-steps .material-symbols-outlined { font-size: 1.1rem; color: var(--bs-primary); }
.dcv-next-steps .is-disabled { opacity: .55; cursor: default; padding: .3rem .75rem; border: 1px dashed var(--bs-border-color); border-radius: 999px; font-size: var(--dcv-fs-body, .875rem); }

/* ------------------------------------------------------------ search menu */
.dcv-search-menu {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 2000;
    margin-top: 2px; max-height: 24rem; overflow-y: auto;
    background: var(--bs-body-bg); color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color); border-radius: var(--dcv-radius, .5rem);
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .14);
    font-size: var(--dcv-fs-body, .875rem); text-align: left;
}
.dcv-search-menu[hidden] { display: none; }
/* The navbar box is 200 px wide; its menu is wider and grows to the left, under the bar. */
.dcv-search-menu.is-end { left: auto; right: 0; width: 26rem; max-width: calc(100vw - 1.5rem); }
.dcv-search-group {
    padding: .5rem .75rem .25rem; font-size: var(--dcv-fs-kicker, .6875rem); font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color);
}
.dcv-search-item {
    display: flex; align-items: flex-start; gap: .6rem; padding: .45rem .75rem;
    color: var(--bs-body-color); text-decoration: none;
}
.dcv-search-item .material-symbols-outlined { font-size: 1.25rem; color: var(--bs-primary); margin-top: .05rem; }
.dcv-search-body { display: flex; flex-direction: column; min-width: 0; }
.dcv-search-label { font-weight: 500; overflow-wrap: anywhere; }
.dcv-search-hint { font-size: var(--dcv-fs-label, .75rem); color: var(--bs-secondary-color); overflow-wrap: anywhere; }
.dcv-search-item:hover, .dcv-search-item.is-active { background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-body-color); }
.dcv-search-intent { border-bottom: 1px solid var(--bs-border-color); background: rgba(var(--bs-primary-rgb), .05); }

/* ------------------------------------------------------------ what am I working on (the navbar pill)
   static/pages/All/js/workon_menu.js builds it inside #dcvWorkon (Elements/Header.html); design: docs/aichat/INVESTIGATION_FLOW_DESIGN_2026-11.md §3.
   A white pill like the search box's (same height, same field on the brand gradient), so it reads as a control and not as a
   nav entry. 1700 px and up: dot, name, size. Below: dot and size only (the name is in the tooltip and the menu). */
.dcv-workon-host { display: flex; align-items: center; margin: .5rem 0; }
.dcv-workon-host[hidden] { display: none; }
@media (min-width: 992px) { .dcv-workon-host { margin: 0 0 0 .75rem; } }
@media (max-width: 991.98px) { .dcv-workon-host { margin: 0 .5rem 0 auto; } }

.dcv-workon { position: relative; display: inline-flex; align-items: stretch; height: 31px; border-radius: 999px;
  background: var(--bs-body-bg); color: var(--bs-body-color); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); font-size: .85rem; }
.dcv-workon-back, .dcv-workon-pill { display: inline-flex; align-items: center; gap: .35rem; padding: 0 .65rem; border: 0; background: none;
  color: inherit; text-decoration: none; white-space: nowrap; border-radius: 999px; font: inherit; }
.dcv-workon-back { border-right: 1px solid var(--bs-border-color); border-radius: 999px 0 0 999px; padding-right: .5rem; }
.dcv-workon-back.is-alone { border-right: 0; border-radius: 999px; }
.dcv-workon-pill { border-radius: 0 999px 999px 0; }
.dcv-workon-back:only-child, .dcv-workon-pill:only-child { border-radius: 999px; }
.dcv-workon-back:hover, .dcv-workon-pill:hover, .dcv-workon-back:focus-visible, .dcv-workon-pill:focus-visible,
.dcv-workon-focus:hover, .dcv-workon-focus:focus-visible { background: rgba(var(--bs-primary-rgb), .1); color: inherit; }
/* Focus (Wave 37, docs/DATASET_FOCUS_DESIGN_2026-11.md § 1.1): the segment left of the pill, one switch and its word. On: the track is the own-data
   colour; the word stays in body ink (white on that colour fails 4.5:1). Off: the track outlined, the word muted. */
.dcv-workon-focus { display: inline-flex; align-items: center; gap: .4rem; padding: 0 .6rem 0 .55rem; border: 0; background: none; color: inherit; font: inherit;
  font-weight: 500; white-space: nowrap; border-radius: 0; border-right: 1px solid var(--bs-border-color); }
.dcv-workon-focus:first-child { border-radius: 999px 0 0 999px; }
.dcv-workon-focus[aria-pressed="false"] .dcv-workon-focus-word { color: var(--bs-secondary-color); }
.dcv-switch { position: relative; width: 1.65rem; height: .95rem; flex: none; border-radius: 999px; border: 1.5px solid var(--dcv-own-data); background: transparent; transition: background .15s; }
.dcv-switch::after { content: ""; position: absolute; top: 1.5px; left: 1.5px; width: .6rem; height: .6rem; border-radius: 50%; background: var(--dcv-own-data); transition: transform .15s, background .15s; }
.dcv-switch.is-on { background: var(--dcv-own-data); }
.dcv-switch.is-on::after { background: var(--bs-body-bg); transform: translateX(.68rem); }
.dcv-workon-item .dcv-switch { margin-left: auto; }
.dcv-workon-kind { font-weight: 400; }
.dcv-workon .material-symbols-outlined { font-size: 1.05rem; }
.dcv-workon-name { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.dcv-workon-n { font-variant-numeric: tabular-nums; color: var(--bs-secondary-color); }
.dcv-workon-label { display: inline-flex; font-weight: 500; max-width: 14rem; overflow: hidden; }
.dcv-workon-title { overflow: hidden; text-overflow: ellipsis; white-space: pre; }
.dcv-own-dot { width: .6rem; height: .6rem; flex: none; border-radius: 50%; background: var(--dcv-own-data); }
.dcv-own-dot.is-muted { background: transparent; border: 2px solid var(--dcv-own-data); }
/* The reader's dataset on a filter table (dcv_table.js setTableLens): a chip while it narrows the rows, a quiet link while it does not.
   The word stays in body ink (white on the own-data colour fails 4.5:1); the colour is the dot and the outline. */
.dcv-tbl-lens {
    display: inline-flex; align-items: center; gap: .4rem; padding: .05rem .2rem .05rem .55rem; font-size: var(--dcv-fs-label); font-weight: 600;
    border: 1px solid var(--dcv-own-data); border-radius: var(--dcv-radius-pill, 999px); color: var(--bs-body-color); background: var(--bs-body-bg); max-width: 100%;
}
.dcv-tbl-lens .dcv-tbl-lens-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcv-tbl-lens button { border: 0; background: transparent; color: var(--bs-secondary-color); font: inherit; font-weight: 500; line-height: 1.4; padding: 0 .4rem; cursor: pointer; white-space: nowrap; }
.dcv-tbl-lens button:hover, .dcv-tbl-lens button:focus-visible { color: var(--bs-body-color); text-decoration: underline; }
.dcv-tbl-lens.is-idle { padding-left: .2rem; border-color: transparent; background: transparent; }
.dcv-tbl-lens.is-idle button { display: inline-flex; align-items: center; gap: .4rem; padding-left: .35rem; }
.dcv-tbl-lens.is-idle:hover, .dcv-tbl-lens.is-idle:focus-within { border-color: var(--dcv-own-data); }
.dcv-tbl-note { font-size: var(--dcv-fs-label); color: var(--bs-secondary-color); }
.dcv-tbl-note.is-error { color: var(--bs-body-color); font-weight: 600; }
@media (max-width: 1699.98px) {
  .dcv-workon-name:not(.dcv-workon-none), .dcv-workon-kind, .dcv-workon-focus-word { display: none; }
  .dcv-workon-focus { padding-right: .5rem; }
  .dcv-workon-n { color: var(--bs-body-color); font-weight: 500; }
  .dcv-workon-back.is-alone .dcv-workon-label { max-width: 9rem; }
}

.dcv-workon-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 1090; width: 20rem; max-width: calc(100vw - 1rem); padding: .4rem;
  background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); border-radius: .5rem;
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15); text-align: left; }
.dcv-workon-menu[hidden] { display: none; }
.dcv-workon-kicker { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); padding: .45rem .6rem .2rem; }
.dcv-workon-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .4rem .6rem; border: 0; border-radius: .35rem;
  background: none; color: inherit; text-align: left; text-decoration: none; font-size: .875rem; }
.dcv-workon-item:hover, .dcv-workon-item:focus-visible { background: rgba(var(--bs-primary-rgb), .1); color: inherit; }
.dcv-workon-item b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.dcv-workon-item small { display: block; color: var(--bs-secondary-color); font-size: .78rem; }
.dcv-workon-item > span:not([class]) { min-width: 0; }
.dcv-workon-item .material-symbols-outlined { color: var(--bs-secondary-color); width: .6rem; display: inline-flex; justify-content: center; }
.dcv-workon-item.is-active b { font-weight: 600; }
.dcv-workon-item .dcv-workon-check { margin-left: auto; color: var(--bs-body-color); width: auto; }
.dcv-workon-row { display: flex; align-items: stretch; gap: .15rem; }
.dcv-workon-row > .dcv-workon-item { flex: 1 1 auto; min-width: 0; }
.dcv-workon-del { flex: none; display: inline-flex; align-items: center; padding: 0 .5rem; border: 0; border-radius: .35rem; background: none; color: var(--bs-secondary-color); }
.dcv-workon-del:hover, .dcv-workon-del:focus-visible { background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-body-color); }
.dcv-workon-del .material-symbols-outlined { font-size: 1.05rem; }
.dcv-workon-flash { padding: .3rem 1rem; font-size: .85rem; color: var(--bs-body-color); background: var(--bs-tertiary-bg); border-bottom: 1px solid var(--bs-border-color); }
.dcv-workon-sep { height: 1px; background: var(--bs-border-color); margin: .35rem .2rem; }
.dcv-workon-foot { font-size: .75rem; color: var(--bs-secondary-color); padding: .35rem .6rem .15rem; }

/* The navbar stays one row at 1280 / 1440 / 1600 (wave 41, the six items: Datasets · Browse · Variant interpretation · AI Chat · Downloads & API · Help):
   1700 px and up: dot, name, size. Below it the pill is dot and size (the name is in the tooltip and the menu), which keeps 1600 on one row with
   Focus and "← Q3" beside the pill. The entries' icons give way next: under 1400 always, under 1600 when the row is at its widest (a dataset and an
   investigation together); the words stay. */
@media (min-width: 992px) and (max-width: 1399.98px) {
  #main-header-navbar .navbar-nav > .nav-item > .nav-link-modern > .material-symbols-outlined { display: none; }
}
@media (min-width: 992px) and (max-width: 1599.98px) {
  #main-header-navbar.dcv-has-workon-full .navbar-nav > .nav-item > .nav-link-modern > .material-symbols-outlined { display: none; }
}

/* The navbar stays one row with the pill (the header's own rules fit it without): the entries tighten and the search box gives way
   (the header sets 200 px under 1500 px, 280 above). Under 992 px the search is inside the collapse and never competes. */
@media (min-width: 992px) and (max-width: 1799.98px) {
  #main-header-navbar.dcv-has-workon .navbar-nav { gap: 0 !important; }
  #main-header-navbar.dcv-has-workon .nav-link-modern { padding-left: .4rem !important; padding-right: .4rem !important; }
  #main-header-navbar.dcv-has-workon .header-quick-search { max-width: 200px !important; }
  #main-header-navbar.dcv-has-workon .dcv-workon-name { max-width: 9rem; }
}
/* Investigation + Focus + dataset (the widest row): below 1800 px the pill drops the kind word ("11 variants" is "11"; the tooltip and the menu keep it). */
@media (min-width: 992px) and (max-width: 1799.98px) {
  #main-header-navbar.dcv-has-workon-full .dcv-workon-kind { display: none; }
}
@media (min-width: 992px) and (max-width: 1399.98px) {
  #main-header-navbar.dcv-has-workon .header-quick-search { max-width: 180px !important; }
  #main-header-navbar.dcv-has-workon-full .header-quick-search { max-width: 160px !important; }
  /* "← Q3" is the arrow alone (the answer is in the tooltip); a lone investigation keeps "Q1" without its title. */
  .dcv-workon-back:not(.is-alone) .dcv-workon-label, .dcv-workon-back.is-alone .dcv-workon-title { display: none; }
}
