/* Listing pages in the store design (src/lib/listing.js, listing-store.js): /miners, brand and algorithm pages, /gpus,
   /cpus. Builds on the homepage's sb-* classes (home-store.css); this file adds what lists need: breadcrumbs in the hero,
   link chips, the sort menu, "Advanced filter", the compare toggle on the photo, the states of a device with
   no price. Round shapes, minerprices violet, Archivo. */

/* ---------- hero ---------- */
.ls-hero .sb-hero-in { padding-top: 26px; }
.ls-hero .crumbs { justify-content: center; margin: 0 0 18px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.ls-h1 { max-width: 24ch; font-size: clamp(32px, 3.8vw, 52px); }
.ls-lead { max-width: 70ch; font-size: 17px; text-wrap: pretty; }
.ls-lead a { color: hsl(var(--foreground)); font-weight: 600; text-decoration: underline; text-decoration-color: #b3a3ff; text-underline-offset: 3px; }
.ls-lead a:hover { text-decoration-color: var(--brand); }
.ls-leadmore { display: none; margin: 6px auto 0; border: 0; background: none; font: 650 14.5px var(--font); color: #5536d6; text-decoration: underline; cursor: pointer; }
.ls-top b.up { color: var(--green-700); }
.ls-top .ls-cmp { color: #5536d6; }
.ls-chips a[aria-current="page"] { border-color: var(--brand-deep); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-deep); }
.ls-chips .plain { padding: 0 18px; }
.ls-chips .ico { font-size: 13px; font-weight: 800; }

/* ---------- filter bar ---------- */
.ls-advbtn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1px solid #d9d2c3; border-radius: 999px; background: hsl(var(--card));
  font: 600 14.5px var(--font); color: hsl(var(--foreground)); cursor: pointer; white-space: nowrap; }
.ls-advbtn:hover, .ls-advbtn[aria-expanded="true"] { border-color: var(--brand-deep); background: var(--brand-soft); }
.ls-advbtn svg { width: 17px; height: 17px; }
.ls-advbtn em { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-style: normal; font-size: 12px; font-weight: 750; }
.ls-advbtn em[hidden] { display: none; }
.ls-sort { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 14.5px; color: #4b5260; white-space: nowrap; }
.ls-sort select { height: 42px; max-width: 220px; padding: 0 36px 0 16px; border: 1px solid #d9d2c3; border-radius: 999px; background: hsl(var(--card)) no-repeat right 14px center / 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235c6371' stroke-width='1.6'/%3E%3C/svg%3E");
  font: 650 14.5px var(--font); color: hsl(var(--foreground)); cursor: pointer; appearance: none; -webkit-appearance: none; text-overflow: ellipsis; }
.ls-sort select:hover { border-color: var(--brand-deep); }
.ls-adv { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; flex: 1 0 100%; padding-top: 4px; }
.ls-adv[hidden] { display: none; }
.ls-num { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #4b5260; white-space: nowrap; }
.ls-num input { width: 104px; height: 40px; padding: 0 14px; border: 1px solid #d9d2c3; border-radius: 999px; background: hsl(var(--card)); font: 650 14.5px var(--font); color: hsl(var(--foreground)); }
.ls-check { position: relative; display: inline-flex; cursor: pointer; }
.ls-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ls-check span { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border: 1px solid #d9d2c3; border-radius: 999px; background: hsl(var(--card)); font-size: 14px; font-weight: 600; white-space: nowrap; }
.ls-check span::before { content: ""; width: 16px; height: 16px; border: 1.5px solid #9aa1ad; border-radius: 50%; background: hsl(var(--card)); }
.ls-check input:checked + span { border-color: var(--brand-deep); background: var(--brand-soft); }
.ls-check input:checked + span::before { border-color: var(--brand); background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center / 14px no-repeat; }
.ls-check input:focus-visible + span { outline: 2px solid #6544f0; outline-offset: 2px; }

/* ---------- section head ---------- */
.ls-count { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.ls-hint { margin-left: auto; }
.ls-reset { border: 0; background: none; font: 600 14.5px var(--font); color: #5536d6; text-decoration: underline; cursor: pointer; }
.ls-reset[hidden] { display: none; }

/* ---------- cards ---------- */
.ls-card .sb-ph { position: relative; }
.ls-phl { display: grid; place-items: center; width: 100%; height: 100%; }
.ls-card .cmp-tog { position: absolute; top: 10px; right: 10px; padding: 7px 11px; border-radius: 999px; background: hsl(var(--card)); font-size: 12.5px; }
.ls-card .cmp-tog:has(input:checked) { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.ls-card h3 .badge { margin-left: 6px; border-radius: 999px; vertical-align: 2px; }
.ls-meta { margin: 3px 0 0; font-size: 13px; color: #5c6371; }
.ls-oos, .ls-none { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.ls-oos { border: 1.5px solid var(--brand); color: #5536d6; }
.ls-none { background: var(--gray-100); color: #4b5260; font-weight: 600; }
.ls-note { margin: 26px auto 0; max-width: 80ch; text-align: center; font-size: 13.5px; color: #5c6371; }

/* ---------- dark theme ---------- */
:root[data-theme="dark"] .ls-lead a { color: #fff; }
:root[data-theme="dark"] .ls-top b.up { color: #4fd1a5; }
:root[data-theme="dark"] .ls-top .ls-cmp, :root[data-theme="dark"] .ls-leadmore, :root[data-theme="dark"] .ls-reset, :root[data-theme="dark"] .ls-oos { color: var(--brand-light); }
:root[data-theme="dark"] .ls-chips a[aria-current="page"], :root[data-theme="dark"] .ls-advbtn:hover, :root[data-theme="dark"] .ls-advbtn[aria-expanded="true"],
:root[data-theme="dark"] .ls-check input:checked + span { background: #251e45; }
:root[data-theme="dark"] .ls-advbtn, :root[data-theme="dark"] .ls-sort select, :root[data-theme="dark"] .ls-num input, :root[data-theme="dark"] .ls-check span { border-color: #3a4252; }
:root[data-theme="dark"] .ls-sort, :root[data-theme="dark"] .ls-num, :root[data-theme="dark"] .ls-none { color: #c3c9d4; }
:root[data-theme="dark"] .ls-meta, :root[data-theme="dark"] .ls-note { color: #b7bfcb; }

/* ---------- narrower screens ---------- */
@media (max-width: 1240px) {
  .ls-hint { display: none; }
  .ls-sort-t { display: none; }
}
/* tablets and phones: "Advanced filter" opens with the other menus behind "Filters" */
@media (max-width: 1000px) {
  .ls-bar .sb-filters ~ .ls-advbtn { display: none; }
  .ls-bar.open .ls-adv[hidden] { display: flex; }
}
@media (max-width: 700px) {
  .ls-chips li:nth-child(n+7) { display: none; }   /* All + the five most mined coins; every coin is in the bar's menu */
  .ls-hero .crumbs { margin-bottom: 12px; font-size: 12px; }
  .ls-h1 { font-size: 30px; }
  .ls-lead { font-size: 15.5px; }
  .ls-lead:has(+ .ls-leadmore):not(.open) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
  .ls-leadmore { display: block; }
  .ls-advbtn { padding: 0 12px; gap: 6px; } .ls-advbtn span { display: none; }
  .ls-chips li:nth-child(6) { grid-column: auto; }
  .ls-sort { flex: 1 1 0; min-width: 0; margin-left: 0; } .ls-sort select { width: 100%; max-width: none; padding: 0 30px 0 12px; background-position: right 11px center; font-size: 14px; }
  .ls-adv { gap: 8px; } .ls-num { flex: 1 1 calc(50% - 8px); min-width: 0; flex-direction: column; align-items: stretch; gap: 4px; font-size: 12.5px; } .ls-num input { width: 100%; }
  .ls-check { flex: 1 1 calc(50% - 8px); min-width: 0; } .ls-check span { width: 100%; padding: 0 10px; font-size: 13px; white-space: normal; line-height: 1.15; }
  .ls-count { font-size: 17px; }
  .ls-card .sb-ph { align-self: stretch; }
  .ls-card .cmp-tog { top: auto; bottom: 6px; right: 50%; transform: translateX(50%); padding: 5px 8px; font-size: 11px; }
  .ls-card .cmp-tog .cmp-l { display: none; }
  .ls-card .sb-ph img { max-height: 70px; }
  .ls-meta { font-size: 12px; }
  .ls-oos, .ls-none { height: 34px; font-size: 13px; }
}
