/* FERNBEDIENT Stromrechner — Frontend. Nutzt Theme-Variablen mit Fallbacks. */
.fbsr {
  --sr-blue: var(--blue, #0063ff);
  --sr-bg: #262626;
  --sr-panel: #2f2f2f;
  --sr-line: var(--line, #4a4a4a);
  --sr-muted: var(--muted, #9a9a9a);
  --sr-field: #1e1e1e;
  --sr-font: var(--font, "Gilroy", "Outfit", -apple-system, "Segoe UI", sans-serif);
  font-family: var(--sr-font);
  color: #fff;
  background: var(--sr-bg);
  border: 1px solid var(--sr-line);
  margin: 32px 0;
}
.fbsr * { box-sizing: border-box; }
.fbsr h3, .fbsr h4 { margin: 0; font-weight: 700; letter-spacing: 0.01em; }
.fbsr .mut { color: var(--sr-muted); }

/* ---- Kopf ---- */
.fbsr-head { display: flex; gap: 18px; align-items: flex-start; padding: 26px 28px; border-bottom: 1px solid var(--sr-line); }
.fbsr-head > .mdi { color: var(--sr-blue); font-size: 34px; line-height: 1; flex: none; }
.fbsr-head h3 { font-size: 22px; }
.fbsr-head p { margin: 8px 0 0; color: #cfcfcf; font-size: 15px; line-height: 1.5; max-width: 62ch; }

/* ---- Steuerleiste ---- */
.fbsr-bar { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; padding: 22px 28px; border-bottom: 1px solid var(--sr-line); }
.fbsr-field { display: flex; flex-direction: column; gap: 7px; }
.fbsr-lab { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sr-muted); }
.fbsr-inp { display: flex; align-items: center; gap: 8px; background: var(--sr-field); border: 1px solid var(--sr-line); padding: 0 12px; height: 44px; }
.fbsr-inp:focus-within { border-color: var(--sr-blue); }
.fbsr-inp .mdi { color: var(--sr-blue); font-size: 18px; }
.fbsr-inp em { color: var(--sr-muted); font-style: normal; font-size: 14px; }
.fbsr-price input { width: 66px; }
.fbsr-inp input, .fbsr-inp select { background: none; border: 0; color: #fff; font: inherit; font-size: 16px; padding: 0; outline: none; }
.fbsr-picker { flex: 1 1 260px; }
.fbsr-picker .fbsr-inp { width: 100%; }
.fbsr-picker select { width: 100%; cursor: pointer; }
.fbsr-picker select option { background: #1e1e1e; color: #fff; }
.fbsr-example { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; background: none; color: #fff; border: 1px solid var(--sr-line); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.fbsr-example:hover { border-color: var(--sr-blue); color: #cfe0ff; }
.fbsr-example .mdi { color: var(--sr-blue); font-size: 18px; }

/* ---- Liste ---- */
.fbsr-list { padding: 4px 30px; }
.fbsr-empty { display: flex; align-items: center; gap: 14px; color: var(--sr-muted); padding: 42px 4px; font-size: 15px; line-height: 1.5; }
.fbsr-empty .mdi { font-size: 30px; color: #5a5a5a; flex: none; }

.fbsr-row {
  display: grid;
  grid-template-columns: minmax(200px, 2.2fr) auto minmax(150px, 1.2fr) minmax(92px, auto) 30px;
  gap: 30px; align-items: center;
  padding: 24px 0; border-top: 1px solid #3a3a3a;
}
.fbsr-list .fbsr-row:first-child { border-top: 0; }

.fbsr-name { display: flex; align-items: center; gap: 13px; min-width: 0; }
.fbsr-name > .mdi { color: var(--sr-blue); font-size: 15px; flex: none; }
.fbsr-name-t { min-width: 0; }
.fbsr-name-t b { font-weight: 600; font-size: 16px; display: block; line-height: 1.35; }
.fbsr-name-t small { color: var(--sr-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.fbsr-ctrl { display: flex; flex-direction: column; gap: 10px; }
.fbsr-clab { font-size: 12px; color: var(--sr-muted); display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.fbsr-clab output { color: var(--sr-blue); font-weight: 600; }

/* Anzahl-Stepper */
.fbsr-stepper { display: inline-flex; align-items: stretch; width: 116px; height: 40px; background: var(--sr-field); border: 1px solid var(--sr-line); }
.fbsr-stepper:focus-within { border-color: var(--sr-blue); }
.fbsr-stepper button { width: 38px; background: none; border: 0; color: #cfcfcf; font-size: 20px; line-height: 1; cursor: pointer; }
.fbsr-stepper button:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.fbsr-stepper input { width: 40px; flex: 1; text-align: center; background: none; border: 0; border-left: 1px solid var(--sr-line); border-right: 1px solid var(--sr-line); color: #fff; font: inherit; font-size: 15px; outline: none; -moz-appearance: textfield; }
.fbsr-stepper input::-webkit-outer-spin-button, .fbsr-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Nutzung */
.fbsr-hours input[type="range"] { width: 100%; accent-color: var(--sr-blue); height: 22px; margin: 0; cursor: pointer; }
.fbsr-const { display: inline-flex; align-items: center; gap: 7px; color: var(--sr-muted); font-size: 13px; height: 22px; }
.fbsr-const .mdi { font-size: 15px; color: #6a6a6a; }

.fbsr-cost { text-align: right; font-weight: 700; font-size: 20px; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fbsr-cost small { display: block; font-weight: 500; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sr-muted); margin-top: 3px; }
.fbsr-rm { justify-self: end; background: none; border: 0; color: #7a7a7a; cursor: pointer; font-size: 19px; line-height: 1; padding: 4px; }
.fbsr-rm:hover { color: #ff6b6b; }

/* ---- Summe ---- */
.fbsr-total { padding: 0 28px; }
.fbsr-total-in { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; justify-content: space-between; padding: 24px; margin: 8px 0 26px; background: var(--sr-panel); border: 1px solid var(--sr-line); }
.fbsr-big { display: flex; flex-direction: column; }
.fbsr-num { font-size: clamp(34px, 6vw, 48px); font-weight: 700; line-height: 1; color: var(--sr-blue); font-variant-numeric: tabular-nums; }
.fbsr-cap { margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sr-muted); }
.fbsr-secs { display: flex; gap: 34px; flex-wrap: wrap; }
.fbsr-secs > div { display: flex; flex-direction: column; }
.fbsr-secs span { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fbsr-secs small { margin-top: 3px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sr-muted); }

/* ---- Datentabellen ---- */
.fbsr-tablewrap { border-top: 1px solid var(--sr-line); }
.fbsr-tablewrap summary { display: flex; align-items: center; gap: 10px; padding: 18px 28px; cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; }
.fbsr-tablewrap summary::-webkit-details-marker { display: none; }
.fbsr-tablewrap summary .mdi { color: var(--sr-blue); font-size: 18px; }
.fbsr-tablewrap[open] summary { border-bottom: 1px solid var(--sr-line); }
.fbsr-tables { padding: 8px 28px 26px; }
.fbsr-tables h4 { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sr-muted); margin: 24px 0 10px; }
.fbsr-scroll { overflow-x: auto; }
.fbsr-tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.fbsr-tbl th, .fbsr-tbl td { text-align: left; padding: 9px 14px 9px 0; border-bottom: 1px solid #383838; white-space: nowrap; }
.fbsr-tbl th { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sr-muted); border-bottom-color: var(--sr-line); }
.fbsr-tbl td.r, .fbsr-tbl th.r { text-align: right; }
.fbsr-tbl td.acc { color: var(--sr-blue); font-weight: 600; }

/* ---- Kleingedrucktes ---- */
.fbsr-fine { padding: 0 28px 26px; color: var(--sr-muted); font-size: 12.5px; line-height: 1.55; margin: 0; }
.fbsr-noscript { padding: 26px 28px; color: var(--sr-muted); }

/* ---- Responsiv ---- */
@media (max-width: 720px) {
  .fbsr-head, .fbsr-bar, .fbsr-list, .fbsr-total, .fbsr-tables, .fbsr-fine { padding-left: 18px; padding-right: 18px; }
  .fbsr-tablewrap summary { padding-left: 18px; padding-right: 18px; }
  .fbsr-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name cost"
      "qty  hours";
    gap: 18px; position: relative; padding-right: 28px;
  }
  .fbsr-name { grid-area: name; }
  .fbsr-cost { grid-area: cost; align-self: start; }
  .fbsr-qty { grid-area: qty; }
  .fbsr-hours { grid-area: hours; align-self: end; }
  .fbsr-rm { position: absolute; top: 22px; right: -4px; }
}
