/* Ready-made builds: the list (gotove-konfiguracije.html, .page-guides), the
   home page's three cards (index.html, js/guidecard.js) and a build's page
   (gotove-konfiguracije/<slug>.html, .page-guide). Loaded after
   css/style.css and css/parts.css; a build's page also loads css/build.css,
   whose slot list, total box and checks panel it shares with the
   configurator, and css/category.css, whose filter controls (.fg, .opts,
   .f-minmax) the "Prilagodi" editor (.tune) is made of. Class names start
   with "ready-", "tune" or "bcard", since .guide-* are the category pages'
   buying guides (style.css). */

/* ---------- the list ---------- */
.ready-group + .ready-group { margin-top: 44px; }
.ready-group h2 { margin-bottom: 16px; }
#guides-promo:not(:empty) { margin-bottom: 32px; }
.ready-note { max-width: 62em; margin-top: 32px; font-size: 13px; line-height: 1.5; color: var(--ink-3); }

/* Two columns of build cards: a tinted picture of the build, then the facts.
   The name's link covers the whole card. */
.blist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bcard { position: relative; display: flex; flex-direction: column; overflow: hidden; transition: border-color .15s; }
.bcard:hover { border-color: var(--line-2); }
.bcard-pic { display: none; place-items: center; height: 180px; padding: 12px; background: var(--tint); }
.js .bcard-pic { display: grid; }
.bcard-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 18px 20px 20px; }
.bcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-3); }
.bcard-tag { font-weight: 500; }
.bcard h3 { font-size: 22px; }
.bcard-link { color: var(--ink); text-decoration: none; }
.bcard-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.bcard:hover .bcard-link { color: var(--accent); }
.bcard-link:focus-visible { outline: none; }
.bcard:has(.bcard-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.bcard-blurb { font-size: 14px; color: var(--ink-2); }
.bcard-gist { font-size: 14px; font-weight: 600; color: var(--ink); }
.bcard-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
}
.bcard-total { font: 750 30px/1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bcard-foot .bstatus { font-size: 13px; }

/* The picture: the case at the back, processor, graphics card and memory in
   front (js/guidecard.js). */
.bpic { display: flex; align-items: flex-end; justify-content: center; transform: scale(1.15); }
.bp { display: grid; place-items: end center; line-height: 0; }
.bp-front { display: flex; align-items: flex-end; gap: 6px; margin-left: -18px; padding-bottom: 2px; }
.bp-igpu {
  display: grid; place-items: center; width: 64px; height: 44px; padding: 4px; border-radius: var(--r-s);
  outline: 1.5px dashed var(--line-2); outline-offset: -1.5px; font-size: 11px; line-height: 1.2; color: var(--ink-3); text-align: center;
}

/* ---------- a build's page ---------- */
/* The head: kind above the name, the intro, then the gist in ink. */
.page-head .ready-kind { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--accent); }
.page-head .ready-gist { margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--ink); }

/* Under a part: the guide's conditions as small static labels (not .chip,
   which is a button), then its text. */
.conds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cond {
  display: inline-flex; align-items: center; min-height: 26px; padding: 3px 10px; border-radius: var(--r-s);
  background: var(--surface-2); color: var(--ink-2); font: 500 12.5px/1.3 var(--font-body); overflow-wrap: anywhere;
}
.ready-text { max-width: 64ch; margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
/* Under conditions the visitor changed: the guide's text is about its own
   conditions, so it is set back behind a short note (js/guidepage.js). */
.ready-text.is-default { color: var(--ink-3); }
.ready-text-note { display: block; margin-bottom: 2px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ready-slots .slot { align-items: start; }
.ready-slots .slot-price { padding-top: 2px; }
.ready-slots .slot-empty .bstatus { display: flex; margin-bottom: 2px; font-size: 13px; }

/* A customised build: the note above the parts, the slot's mark. */
.ready-custom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px;
  padding: 12px 14px 12px 16px; border-radius: var(--r-l); background: var(--accent-soft); font-size: 14px; color: var(--ink-2);
}
.ready-custom[hidden] { display: none; }
.ready-custom b { color: var(--accent); font-weight: 650; }
.ready-custom p { flex: 1 1 320px; }
.ready-tuned { color: var(--accent); font-weight: 600; }
.ready-none { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.ready-slots .slot.tuning { background: var(--surface-2); }

/* ---------- "Prilagodi" (js/guidepage.js) ----------
   A <dialog>: open on the page under its slot on a wide screen (the slot's
   last row), modal and full screen on a phone, like the category page's
   filter sheet. The groups are the category filters' own (.fg). */
.tune {
  grid-column: 1 / -1; position: static; width: auto; max-width: none; height: auto; max-height: none;
  margin: 12px 0 0; padding: 0; border: 1px solid var(--tint-2); border-radius: var(--r-l); background: var(--tint); color: var(--ink);
}
.tune-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 8px 0 18px; }
.tune-title { font-size: 17px; line-height: 1.25; outline: none; }
.tune-close { color: var(--ink-2); }
.tune-close:hover { background: var(--surface-2); color: var(--ink); }
.tune-body { padding: 0 18px; }
.tune-intro { max-width: 70ch; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.tune-conds { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 28px; }
.tune .fg { min-width: 0; margin: 0; padding: 14px 0; border: 0; border-bottom: 1px solid var(--tint-2); }
.tune legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; float: left; width: 100%; margin-bottom: 8px; padding: 0;
  font-weight: 650; font-size: 14px;
}
.tune legend + * { clear: left; }
.tune legend .f-val { color: var(--ink-2); font-weight: 500; }
.tune-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.tune-op { height: 30px; padding: 0 26px 0 8px; font-size: 13px; }
.tune-rm { width: 30px; height: 30px; color: var(--ink-3); }
.tune .f-search { width: 100%; height: 34px; margin: 0 0 6px; padding: 0 10px; border-radius: var(--r-s); font-size: 13.5px; }
.tune .f-num { width: 100%; min-width: 0; height: 36px; padding: 0 8px; font-size: 14px; -moz-appearance: textfield; appearance: textfield; }
.tune-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 0; font-size: 14px; font-weight: 650; }
.tune-add select { min-width: 0; max-width: 100%; height: 36px; font-weight: 400; }
.tune-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 12px 18px 16px; border-top: 1px solid var(--tint-2);
}
.tune-status { flex: 1 1 280px; min-width: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }
.tune-status b { color: var(--ink); font-weight: 600; }
.tune-pending { color: var(--warn); }
.tune-btns { display: flex; gap: 10px; }

/* the total's two buttons, one under the other in the side column */
.ready-actions .btn { flex: 1 1 100%; }
.total-hint { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }

/* ---------- breakpoints ---------- */
@media (max-width: 1020px) {
  .ready-actions .btn { flex: 1 1 220px; }
}
/* Phones: the editor is the filter sheet (sticky head and foot, the body
   scrolls, controls at least 40px high). */
@media (max-width: 860px) {
  .tune:modal {
    display: flex; flex-direction: column; position: fixed; inset: 0; width: 100%; height: 100%;
    margin: 0; border: 0; border-radius: 0; background: var(--surface);
  }
  .tune:modal::backdrop { background: transparent; }
  .tune:modal .tune-head { flex: none; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); }
  .tune:modal .tune-title { padding: 10px 0; font-size: 19px; }
  .tune:modal .tune-close { width: 44px; height: 44px; color: var(--ink); }
  .tune:modal .tune-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 16px; }
  .tune:modal .tune-intro { margin-top: 12px; }
  .tune:modal .tune-foot {
    flex: none; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface);
  }
  .tune:modal .tune-btns { flex: 1 1 100%; }
  .tune:modal .tune-btns .btn-primary { flex: 1; justify-content: center; }
  .tune:modal .fg { border-bottom-color: var(--line); }
  body:has(.tune:modal) { overflow: hidden; }
  .tune .opt { min-height: 40px; }
  .tune .f-search, .tune .f-num, .tune-add select { height: 40px; font-size: 16px; }
  .tune-op { height: 40px; font-size: 16px; }
  .tune-rm { width: 40px; height: 40px; }
}
@media (max-width: 720px) {
  .blist { grid-template-columns: minmax(0, 1fr); }
  .bpic { transform: none; }
  .bcard-pic { height: 150px; }
  .ready-group + .ready-group { margin-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .bcard { transition: none; }
}
