/* Ma boutique in the new look (SKI-1280; portal/homeWide, homePhone, answeringWide, headStates;
   portalSmallPages/preparingWide, emptyListWide): the refresh, the catalogue notice, the coverage
   card with the portal's one large figure, the four figure cards (one of the two painted groups),
   the toolbar, the list and its rows, the answer panels portal.js clones in, the preparing state.
   The controls are ticket 03's (css/controls.css), placed here and never restyled. Every value
   reads a variable of css/tokens.css; nothing moves.

   A class that other pages wear too (.row, .head, .rows, .namecell, .brandline, .price, .thumb,
   .acts, .toolbar, .preparing) is ruled for this page under :where([data-page="retailer"]),
   which adds no weight and keeps these rules off the other pages. */

/* ── the head: « Actualiser mes prix », a refresh running, the button off until tomorrow ── */
.running {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.running .small {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
/* The bar on rose's tint, filled in rose (headStates); its width is the run's share, at once. */
.progress {
  flex: none;
  width: 220px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-rose-tint);
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--color-rose-mid);
}
.running .progress + .small {
  color: var(--color-ink-2);
}

/* ── the catalogue notice: « something failed » (headStates), its first line a Label, the rest
   Small in ink 2, its links in ink and underlined ── */
.catalog-api-notice {
  gap: 12px;
  margin-bottom: 24px;
}
.catalog-api-notice > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.catalog-api-notice p {
  color: var(--color-ink-2);
  font-size: var(--text-small);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-small);
}
.catalog-api-notice p:first-child {
  color: var(--color-ink);
  font-size: var(--text-label);
  font-weight: var(--font-weight-medium);
  line-height: 1.45;
}
.catalog-api-notice p:first-child b {
  font-weight: inherit;
}
.catalog-api-notice a {
  color: var(--color-ink);
}
.catalog-api-notice code {
  font: inherit;
}

/* ── the coverage card: the Overline, « 56 % » in Black, the two lines beside it, the tagline;
   the bar plain and rounded, rose on rose's tint; the two stats; « Proposer » quiet and small;
   the fine print in muted ── */
.retailer-coverage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 56px;
  padding: 28px;
  margin-bottom: 24px;
}
.cov-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.cov-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.retailer-coverage .eyebrow {
  color: var(--color-rose-deep);
  font-size: var(--text-overline);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-overline);
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
}
.cov-big {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cov-big b {
  flex: none;
  color: var(--color-ink);
  font-size: var(--text-headline);
  font-weight: var(--font-weight-black);
  line-height: var(--leading-headline);
  letter-spacing: var(--tracking-headline);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
/* The « % » takes the figure's size, a space after it. */
.cov-big b span {
  margin-left: 0.25em;
}
.cov-big-lbl {
  color: var(--color-ink);
  font-size: var(--text-name);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-name);
}
.retailer-coverage .cov-left > p,
.retailer-coverage .cov-note {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.ticks {
  height: 12px;
  border-radius: var(--radius-pill);
  background: var(--color-rose-tint);
  overflow: hidden;
}
.ticks i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--color-rose-mid);
}
.cov-stats {
  display: flex;
  align-items: center;
  gap: 40px;
}
.cov-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cov-stat b {
  color: var(--color-ink);
  font-size: var(--text-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  font-variant-numeric: lining-nums tabular-nums;
}
.cov-stat span {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.cov-stats .btn {
  margin-left: auto;
}

/* ── the four figure cards: paper with the thin edge, the painted icon on a tile of 44; the two
   that wait for an answer filled with butter's tint, the page's one filled group. The one whose
   filter is in use takes the field's ink edge. ── */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 20px;
  color: var(--color-ink);
  text-decoration: none;
}
.metric.warn {
  border-color: transparent;
  background: var(--color-butter-tint);
}
.metric.on {
  border-color: var(--color-ink);
  box-shadow: inset 0 0 0 0.5px var(--color-ink);
}
@media (hover: hover) {
  .metric:hover {
    box-shadow: var(--shadow-lift);
  }
  .metric.on:hover {
    box-shadow:
      inset 0 0 0 0.5px var(--color-ink),
      var(--shadow-lift);
  }
}
.metric:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}
.metric .ic {
  display: grid;
  place-items: center;
  width: var(--size-tile);
  height: var(--size-tile);
  margin-bottom: 10px;
  border-radius: var(--radius-16);
  color: var(--color-ink);
}
.metric .ic .ph-duotone {
  width: 24px;
  height: 24px;
}
.metric .ic.green {
  background: var(--color-green-tint);
  --paint: var(--color-green-mid);
}
.metric .ic.grey {
  background: var(--color-oat);
  --paint: var(--color-unavailable);
}
.metric .ic.amber {
  background: var(--color-butter-tint);
  --paint: var(--color-butter-mid);
}
.metric.warn .ic {
  background: var(--color-paper);
}
.metric b {
  font-size: var(--text-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  font-variant-numeric: lining-nums tabular-nums;
}
.metric .lbl {
  font-size: var(--text-name);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-name);
}
.metric .hint {
  margin-top: 10px;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.metric.warn .hint {
  color: var(--color-ink-2);
}

/* ── the toolbar (css/controls.css): the filters as chips, the search field at the right, 430
   wide where it fits ── */
:where([data-page="retailer"]) .toolbar .search {
  flex: 1 1 260px;
  max-width: 430px;
}
:where([data-page="retailer"]) .toolbar .search .input {
  width: 100%;
}

/* ── above the list: the retired list's title, the reassurance on the two « answer us » tabs,
   in the « it worked » look ── */
.listtitle {
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.listtitle:empty {
  display: none;
}
.reassure {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 13px 16px;
  border-radius: var(--radius-16);
  background: var(--color-green-tint);
  color: var(--color-ink);
  font-size: var(--text-label);
  line-height: var(--leading-small);
}
.reassure > .ph-duotone {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--color-green-deep);
}
.reassure b {
  font-weight: var(--font-weight-bold);
}

/* ── the list: one paper card, the column names Small in muted, rows divided by the thin edge
   and none with a fill. One template for the header and every row, every column fixed but the
   name, so the header always sits over its values. ── */
:where([data-page="retailer"]) {
  --cols: var(--size-tile-large) minmax(0, 1fr) 80px 100px 148px 296px;
}
:where([data-page="retailer"]) .rows {
  overflow: hidden;
  /* paging scrolls the list back into view with the toolbar above it still showing */
  scroll-margin-top: 80px;
}
:where([data-page="retailer"]) .head,
:where([data-page="retailer"]) .row {
  display: grid;
  grid-template-columns: var(--cols);
  column-gap: 16px;
  align-items: center;
}
:where([data-page="retailer"]) .head {
  padding: 14px 24px;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
:where([data-page="retailer"]) .head .span2 {
  grid-column: 1 / span 2;
}
:where([data-page="retailer"]) .row {
  row-gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--color-edge);
}
:where([data-page="retailer"]) .rows > .empty {
  border-top: 1px solid var(--color-edge);
}
:where([data-page="retailer"]) .row > *,
:where([data-page="retailer"]) .head > * {
  min-width: 0;
}
/* The picture on an oat tile of 16 (css/controls.css). */
:where([data-page="retailer"]) .row img,
:where([data-page="retailer"]) .row .thumb {
  width: var(--size-tile-large);
  height: var(--size-tile-large);
  border-radius: var(--radius-16);
  background: var(--color-oat);
  object-fit: cover;
}
:where([data-page="retailer"]) .row .thumb.noimg .ph {
  width: 20px;
  height: 20px;
}
:where([data-page="retailer"]) .namecell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
:where([data-page="retailer"]) .row .brandline {
  color: var(--color-rose-deep);
  font-size: var(--text-overline);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-overline);
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
}
:where([data-page="retailer"]) .row .name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-ink);
  font-size: var(--text-name);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-name);
}
:where([data-page="retailer"]) .row .why {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
/* The size. */
:where([data-page="retailer"]) .row > .namecell + span {
  color: var(--color-ink-2);
  font-size: var(--text-label);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-label);
}
/* The price in the Price role, red, tabular; a held price under the struck one, in Small. */
:where([data-page="retailer"]) .row .price {
  color: var(--color-red);
  font-size: var(--text-price);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-price);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
:where([data-page="retailer"]) .row .price.held {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
:where([data-page="retailer"]) .row .price s {
  color: var(--color-muted);
  font-size: var(--text-small);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-small);
  text-decoration: line-through 1px;
}
/* No price read yet: the dash is no price, so it is not red. */
:where([data-page="retailer"]) .row[data-status="unpriced"] .price {
  color: var(--color-muted);
}
:where([data-page="retailer"]) .row .pill {
  justify-self: start;
}
/* The actions: a row SkinSouk judged gets two buttons, which then share the column on two
   lines. */
:where([data-page="retailer"]) .row .acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* ── a row being answered: an oat panel under it, the diagnosis line, the answers as paper
   cards with the thin edge (the chosen one on rose's soft), then what the chosen answer asks
   and the foot's quiet buttons (answeringWide). The row itself takes no fill. ── */
:where([data-page="retailer"]) .row .resolve {
  grid-column: 2 / -1;
  margin-bottom: 4px;
}
.resolve {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-16);
  background: var(--color-oat);
}
.resolve > * {
  grid-column: 1 / -1;
  min-width: 0;
}
/* A confirmation shares its line with the foot; the address field has a line of its own. */
.resolve:has(> .answer-body > .confirm) > .answer-body {
  grid-column: 1;
}
.resolve:has(> .answer-body > .confirm) > .resolve-foot {
  grid-column: 2;
}
.answer-body:empty {
  display: none;
}
.diag {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-ink-2);
  font-size: var(--text-label);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-label);
}
.diag > .ph-duotone {
  width: 18px;
  height: 18px;
  color: var(--color-ink);
}
.diag b {
  color: var(--color-ink);
  font-weight: var(--font-weight-bold);
}
.diag a {
  color: var(--color-ink);
  text-decoration: underline 1px;
  text-underline-offset: 3px;
}
.diag a .ph {
  display: none;
}
.answers {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 12px;
}
.answer {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  row-gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--color-edge);
  border-radius: var(--radius-16);
  background: var(--color-paper);
  color: var(--color-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.answer > .ph-duotone {
  grid-row: span 2;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--color-ink);
}
.answer b {
  font-size: var(--text-label);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-label);
}
.answer span {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
@media (hover: hover) {
  .answer:hover {
    box-shadow: var(--shadow-lift);
  }
}
.answer:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}
.answer.on {
  background: var(--color-rose-soft);
}
.answer.on span {
  color: var(--color-ink-2);
}
.answer-body .relink {
  max-width: none;
}
.confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-ink-2);
  font-size: var(--text-label);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-label);
}
.confirm .btn {
  flex: none;
}
.resolve-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* ── under the list: the pager, the quiet link to the retired list ── */
:where([data-page="retailer"]) .pager {
  margin-top: 24px;
}
:where([data-page="retailer"]) .pager:empty {
  display: none;
}
/* The retired list's one line is a quiet link, a Small. */
.retired {
  margin-top: 24px;
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

/* ── a shop in preparation: a whole page with nothing on it yet, Souki waiting at 132, the
   Heading, the two lines, the main button (preparingWide) ── */
:where([data-page="retailer"]) .preparing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 72px 24px;
  text-align: center;
}
.preparing-face {
  flex: none;
  width: 132px;
  height: 132px;
  margin-bottom: 8px;
}
:where([data-page="retailer"]) .preparing b {
  max-width: 520px;
  color: var(--color-ink);
  font-size: var(--text-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}
:where([data-page="retailer"]) .preparing span {
  max-width: 520px;
  color: var(--color-ink-2);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}
:where([data-page="retailer"]) .preparing .btn {
  margin-top: 16px;
}

/* ── narrower windows. Under 1360 the fixed columns and their gaps give the name more room;
   under 1240 a row becomes a block, as on the phone (homePhone): the picture, the brand and the
   name, the « why »; then the pill, the size and the price; then the actions. ── */
@media (max-width: 1360px) {
  :where([data-page="retailer"]) {
    --cols: var(--size-tile-large) minmax(0, 1fr) 72px 88px 148px 296px;
  }
  :where([data-page="retailer"]) .head,
  :where([data-page="retailer"]) .row {
    column-gap: 12px;
  }
}
@media (max-width: 1240px) {
  /* The coverage card in one column and the figure cards two by two: four cards and two
     columns of the card no longer fit their words beside the menu. */
  .retailer-coverage {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  :where([data-page="retailer"]) .head {
    display: none;
  }
  :where([data-page="retailer"]) .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 10px;
    padding: 16px;
  }
  /* The column names are hidden: the first row's edge would double the card's own. */
  :where([data-page="retailer"]) .rows > .head + .row,
  :where([data-page="retailer"]) .rows > .empty {
    border-top: 0;
  }
  :where([data-page="retailer"]) .row img,
  :where([data-page="retailer"]) .row .thumb {
    flex: none;
    align-self: flex-start;
    width: var(--size-tile);
    height: var(--size-tile);
    margin-right: 2px;
  }
  :where([data-page="retailer"]) .row .namecell {
    flex: 1 1 calc(100% - 56px);
  }
  :where([data-page="retailer"]) .row .pill {
    order: 1;
  }
  :where([data-page="retailer"]) .row > .namecell + span {
    order: 2;
  }
  :where([data-page="retailer"]) .row .price {
    order: 3;
    margin-left: auto;
  }
  :where([data-page="retailer"]) .row .price.held {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
  :where([data-page="retailer"]) .row .acts {
    order: 4;
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  :where([data-page="retailer"]) .row .acts > a.iconbtn {
    margin-left: auto;
  }
  :where([data-page="retailer"]) .row .resolve {
    order: 5;
    flex: 1 1 100%;
    margin-bottom: 0;
  }
}
/* Under 900, as homePhone: the coverage card tighter, its « Proposer » the column's width, the
   figure cards smaller, the search the column's width, the answers one under the other. */
@media (max-width: 900px) {
  .retailer-coverage {
    gap: 16px;
    padding: 20px;
  }
  .cov-big {
    gap: 14px;
  }
  .cov-stats {
    flex-wrap: wrap;
    gap: 16px 28px;
  }
  .cov-stats .btn {
    flex: 1 1 100%;
    margin-left: 0;
  }
  .metric {
    padding: 16px;
  }
  .metric .ic {
    width: 40px;
    height: 40px;
  }
  .metric .ic .ph-duotone {
    width: 22px;
    height: 22px;
  }
  :where([data-page="retailer"]) .toolbar {
    gap: 12px;
  }
  :where([data-page="retailer"]) .toolbar .search {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }
  .answers {
    grid-auto-flow: row;
  }
  .resolve:has(> .answer-body > .confirm) > .answer-body,
  .resolve:has(> .answer-body > .confirm) > .resolve-foot {
    grid-column: 1 / -1;
  }
  .confirm {
    flex-wrap: wrap;
  }
}
