/* =========================
   FILE: berechnung.css
   ========================= */

.hidden { display: none !important; }

.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

.card.calc{
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  padding:14px;
}

/* =========================
   Header + Hinweistext
   ========================= */
.barHeader{
  display:inline-block;
  width: fit-content;
  max-width:100%;
  padding:10px 12px;
  border-radius:10px;
  background:#f0f2f7;
  margin-bottom:10px;
}

.barHeaderTitle{
  font-weight:700;
  color:#111;
  margin:0;
  display:block;
}

.underNote{
  display:block;
  width:100%;
  color:#111;
  opacity:.9;
  margin:6px 0 0;
  font-size:11px;
  line-height:1.35;
}

@media (max-width: 600px){
  .underNote{ font-size:10px; }
}

/* =========================
   Form / Grid
   ========================= */
.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

.field{
  position: relative; /* ✅ für Autocomplete Dropdown */
}

/* ✅ Button-Zeile links bündig */
.field.full{
  grid-column: 1 / -1;
  display:flex;
  justify-content:flex-start;
}

.field label{
  display:block;
  font-weight:700;
  margin-bottom:6px;
  color:#111;
}

.field input[type="text"],
.field input[type="number"]{
  width:100%;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.18);
  border-radius:10px;
  outline:none;
  color:#111;
}

/* =========================
   Autocomplete (Geoapify)
   ========================= */
.acList{
  position:absolute;
  left:0;
  right:0;
  top: calc(100% + 6px);
  background:#fff;
  border:1px solid rgba(0,0,0,.18);
  border-radius:12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  max-height: 260px;
  overflow:auto;
  z-index: 999999;
}

.acItem{
  padding:10px 12px;
  cursor:pointer;
  font-weight:700;
  color:#111;
  line-height:1.25;
}

.acItem:hover{ background:#f3f4f6; }

.acHint{
  padding:10px 12px;
  font-weight:700;
  color:#111;
  opacity:.70;
}

/* =========================
   Buttons
   ========================= */
.actions{
  display:flex;
  gap:10px;
  margin-top:12px;
}

.primary, .ghost, .linkBtn{
  border-radius:10px;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.18);
  cursor:pointer;
  font-weight:800;
}

.primary{
  background:#111;
  color:#fff;
  border-color:#111;
}

.primary.disabled{
  opacity:.5;
  cursor:not-allowed;
}

.ghost{
  background:#fff;
  color:#111;
}

/* ✅ "Nächstes Ziel (optional)" = links, einfacher Rahmen, ohne Plus */
.linkBtn{
  width:auto !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;

  background:#fff;
  border:1px solid rgba(0,0,0,.22);
  color:#111;

  box-shadow:none;
  user-select:none;
  white-space:nowrap;
}

.linkBtn:hover{
  background:#f3f4f6;
  border-color: rgba(0,0,0,.30);
}

.linkBtn:active{ transform: translateY(1px); }

/* =========================
   Stop-Felder
   ========================= */
.stopHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}

.miniRow--head{
  display:flex;
  align-items:center;
  gap:10px;
}

.miniLabel{
  font-weight:800;
  color:#111;
}

.stopRemove{
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.18);
  background:#fff;
  font-size:20px;
  font-weight:900;
  cursor:pointer;
  color:#111;
}

/* =========================
   Hinweise / Fehler
   ========================= */
.recalcHint{
  margin-top:10px;
  padding:10px 12px;
  border-radius:10px;
  background:#fff3cd;
  color:#111;
  font-weight:800;
}

.tarifError{
  margin-top:10px;
  padding:10px 12px;
  border-radius:10px;
  background:#f8d7da;
  color:#111;
  font-weight:800;
}

.resultHidden{ display:none; }

/* =========================
   Ergebnis-Karten
   ========================= */
.result{
  position: relative;
  margin-top: 12px;
}

.resultGrid{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:12px;
  margin-top:12px;
}

.resultCard{
  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  padding:12px;
  background:#fff;
}

.rcTitle{
  font-weight:900;
  color:#111;
  margin-bottom:8px;
}

/* Preis+MwSt links, Button rechts */
.rcHeadRow{
  display:flex;
  align-items:center;
  gap:12px;
}

.rcPriceLine{
  display:flex;
  align-items:baseline;
  gap:10px;
  flex-wrap:wrap;
  min-width:0;
}

.rcPriceValue{
  font-size:22px;
  font-weight:700;
  color:#111;
}

.rcInlineMeta{
  font-size:13.5px;
  font-weight:700;
  color:#111;
  opacity:.80;
}

.rcSubLine{
  margin-top:6px;
  font-size:13px;
  font-weight:700;
  color:#111;
  opacity:.85;
}

/* ✅ Preisdetails Button: hell, echte Button-Optik, Breite nach Text */
.rcDetailBtn{
  margin-left:auto;
  border-radius:10px;
  padding:8px 12px;
  border:1px solid rgba(0,0,0,.22);
  background:#fff;
  color:#111;
  cursor:pointer;
  font-weight:800;
  white-space:nowrap;
}

.rcDetailBtn:hover{
  background:#f3f4f6;
  border-color: rgba(0,0,0,.30);
}

.rcDetailBtn.is-open{
  background:#111;
  color:#fff;
  border-color:#111;
}

/* Details-Liste */
.rcBreak{
  margin-top:10px;
  border-top:1px solid rgba(0,0,0,.08);
  padding-top:8px;
  color:#111;
  font-weight:700;
}

.rcBreak .row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:4px 0;
  color:#111;
}

.rcBreak .row span{ color:#111; opacity:1; }
.rcBreak .row b{ color:#111; font-weight:900; white-space:nowrap; }
.rcBreak .row.muted{ opacity:1; }

/* =========================
   Info-Block (Überschrift + Route + Fahrzeugwahl)
   ========================= */
.sumTitle{
  font-weight:700;
  font-size:14px;
  color:#111;
  opacity:.75;
  margin:0 0 8px;
  line-height:1.2;
}

.sumInfoBox{
  display:inline-block;
  width:fit-content;
  max-width:100%;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  background: rgba(0,0,0,.02);
  padding:10px 12px;
  margin:10px 0 12px;
}

.sumRoute2{ margin:0; color:#111; }

.sumRouteHead{
  font-weight:600;
  font-size:12.5px;
  color:#111;
  opacity:.65;
  margin-bottom:2px;
}

.sumRouteVals b{
  font-weight:600;
  font-size:13.5px;
  color:#111;
  opacity:.95;
}

.sumInfoBox .sumRouteHead,
.sumInfoBox .sumRouteVals{
  width:100%;
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap:14px;
}

.sumInfoBox .sumRouteHead span,
.sumInfoBox .sumRouteVals b{
  white-space:nowrap;
}

/* Fahrzeugwahl: rechts an den Rand */
.sumVehicle{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  padding:8px 10px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  background: rgba(0,0,0,.02);
  margin-bottom:12px;
  color:#111;
  font-weight:700;
  font-size:13.5px;
}

.sumVehicleLabel{ font-weight:700; color:#111; opacity:.9; }

.vehPick{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
  color:#111;
}

.vehPick input{ width:16px; height:16px; }

.sumVehicle--inline{
  border:0;
  background:transparent;
  padding:8px 0 0;
  margin:8px 0 0;
  border-top:1px solid rgba(0,0,0,.10);
  border-radius:0;
}

.sumVehicle--inline .vehRight{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:16px;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 820px){
  .grid{ grid-template-columns: 1fr; }
  .resultGrid{ grid-template-columns: 1fr; }
  .barHeaderTitle{ font-size:15px; line-height:1.2; }
}

@media (max-width: 520px){
  .sumInfoBox .sumRouteHead,
  .sumInfoBox .sumRouteVals{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap:6px;
  }

  .sumVehicle--inline .vehRight{
    margin-left:0;
    width:100%;
    justify-content:flex-start;
  }
}
