/* ============================================================
   Danbit Spec Filter (front) - matches the EmbeddedPC filter look,
   with Danbit brand colours.
     --dbf-accent    #077EE0  Danbit blue  (sliders, checkboxes, links)
     --dbf-accent-2  #74C925  Danbit green (active value emphasis)
   ============================================================ */
:root {
  --dbf-accent: #077ee0;
  --dbf-accent-2: #74c925;
  --dbf-ink: #1b2026;
  --dbf-line: #e3e7ec;
}

/* Flush left-column block - NO card, just a top divider. */
.dbf-block {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--dbf-line);
  font-size: 0.95rem;
}

.dbf-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}
.dbf-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dbf-ink);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.dbf-clear {
  border: 0;
  background: none;
  padding: 0;
  color: var(--dbf-accent);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

/* Live "N produkter matcher" line under the header. */
.dbf-count {
  margin: 0 0 0.75rem;
  min-height: 1.1em;
  font-size: 0.85rem;
  color: var(--dbf-accent-2);
  font-weight: 600;
}

/* ── Facet ────────────────────────────────────────────── */
.dbf-facet {
  padding: 0.85rem 0;
  border-top: 1px solid var(--dbf-line);
}
.dbf-facet:first-of-type { border-top: 0; }

.dbf-facet__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.dbf-facet__label { font-weight: 600; color: var(--dbf-ink); }

/* ── Slider: comparator + number field + unit, then range ─ */
.dbf-facet__input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: #7a8592;
}
.dbf-facet__cmp { font-weight: 700; color: #9aa4af; }
.dbf-facet__num-input {
  width: 4.5rem;
  padding: 0.15rem 0.35rem;
  border: 1px solid var(--dbf-line);
  border-radius: 5px;
  font-size: 0.85rem;
  text-align: right;
  color: var(--dbf-ink);
  background: #fff;
  -moz-appearance: textfield;
}
.dbf-facet__num-input::-webkit-outer-spin-button,
.dbf-facet__num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dbf-facet__num-input:focus {
  outline: none;
  border-color: var(--dbf-accent);
  box-shadow: 0 0 0 2px rgba(7, 126, 224, 0.15);
}
.dbf-facet__num-input::placeholder { color: #9aa4af; font-weight: 400; }
/* Active value (a number is set) turns Danbit green. */
.dbf-facet__num-input:not(:placeholder-shown) {
  border-color: var(--dbf-accent-2);
  color: var(--dbf-accent-2);
  font-weight: 700;
}
.dbf-facet__input-wrap:has(.dbf-facet__num-input:not(:placeholder-shown)) .dbf-facet__cmp {
  color: var(--dbf-accent-2);
}

.dbf-facet__unit {
  color: #7a8592;
  min-width: 1.8rem;
}

.dbf-facet__slider {
  width: 100%;
  margin: 0.1rem 0 0.35rem;
  accent-color: var(--dbf-accent);
  cursor: pointer;
}
.dbf-facet__ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #9aa4af;
}
.dbf-facet__hint {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: #9aa4af;
  line-height: 1.3;
}

/* ── Select / bool lists ──────────────────────────────── */
.dbf-facet__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}
.dbf-facet__item label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
  cursor: pointer;
  margin: 0;
  font-weight: 400;
}

.dbf-facet__check {
  accent-color: var(--dbf-accent);
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

/* ── Bool facet as an on/off switch ─────────────────────── */
.dbf-facet--bool { margin-bottom: 0; }
.dbf-switch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  margin: 0;
  padding: 0.15rem 0;
}
.dbf-switch__text {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.dbf-switch .dbf-facet__label { font-weight: 600; }   /* reads as a section title */
/* hide the native checkbox but keep it functional + accessible */
.dbf-switch .dbf-facet__bool {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.dbf-switch__track {
  flex: 0 0 auto;
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #cbd3db;
  transition: background 0.15s ease;
}
.dbf-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.dbf-switch .dbf-facet__bool:checked ~ .dbf-switch__track {
  background: var(--dbf-accent-2);
}
.dbf-switch .dbf-facet__bool:checked ~ .dbf-switch__track .dbf-switch__thumb {
  transform: translateX(16px);
}
.dbf-switch .dbf-facet__bool:focus-visible ~ .dbf-switch__track {
  box-shadow: 0 0 0 3px rgba(7, 126, 224, 0.3);
}
.dbf-facet__name { flex: 1 1 auto; color: var(--dbf-ink); line-height: 1.25; }
.dbf-facet__num {
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: #9aa4af;
  background: #f2f5f8;
  border-radius: 10px;
  padding: 0 0.45rem;
  min-width: 1.6rem;
  text-align: center;
}

.dbf-empty {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #fff6f6;
  border: 1px solid #f2d0d0;
  border-radius: 6px;
  color: #a04141;
  font-size: 0.85rem;
}

/* ── Product page spec table (unchanged behaviour) ────── */
.dbf-product-specs { margin: 2rem 0; }
.dbf-specs-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dbf-ink);
  margin-bottom: 0.75rem;
}
.dbf-specs-table th.dbf-spec-name {
  width: 30%;
  font-weight: 600;
  color: var(--dbf-ink);
  vertical-align: top;
}
.dbf-specs-fallback { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Danbit 06.11.2026: værdier der giver 0 produkter med de nuværende valg fortones (kan stadig vælges) */
.dbf-facet__item--zero label, .dbf-facet--zero .dbf-switch { opacity: .45; }
.dbf-facet__item--zero .dbf-facet__num, .dbf-facet--zero .dbf-facet__num { background: transparent; }

/* Danbit 02.11.2026: listen fortones, mens filteret henter den fra serveren (server-tilstand) */
.dbf-loading { opacity: .4; pointer-events: none; transition: opacity .15s ease; }
