/* ============================================================================
   11k-kalkulator-transport-montaz.css — okno „Kalkulator kosztów”: panele TRANSPORT i MONTAŻ wg wzoru (kalk_czesc.txt 18.10.2026)
   ----------------------------------------------------------------------------
   Pasek trybu (.pcost-tbar + .pcost-seg2), sekcje-karty (.pcost-sk: nagłówek h5 + podpis + kwota .pcost-skk), odcinki jako karty (.pcost-lg:
   nazwa → rodzaj Droga | Morze | Door-to-door → koszt .pcost-lgk → usuń; pola .pcost-lgb; wyliczenie albo czerwone ostrzeżenie .pcost-lgo),
   przycisk źródła/AUTO-MANUAL (.pcost-am), „Prace z zestawienia” (.pcost-pzr), wyniki (.pcost-wy2). Kod: okna/koszty-22, -23 (+ koszty-3, -4).
   Siatka pól (wzór): komputer ≥ 761 px edytora — droga 1fr 110px 150px, morze / door-to-door 1fr 110px; ≤ 760 px — dwie kolumny, pola .w2 na całą szerokość.
   Tokeny programu (wzór → program): --pow→--surface, --pow-2/3→--surface-2/3, --linia→--line, --linia-2→--line-soft, --ramka→--line-strong,
   --tusz→--text, --tusz-2→--text-muted, --tusz-3→--text-faint, --ak→--accent, --bl→--danger, --uw→--warn-strong, --h-k→--h-control.
   Progi: @media 1180/640 = @container app; @container ked = szerokość edytora. Zero !important.
   ============================================================================ */

.pcost-pan-kol { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.pcost-uwg { display: none; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn-strong); font-size: var(--t-sm); }
.pcost-uwg .icon { flex: none; width: 16px; height: 16px; }
.pcost-ed-body:has(input[name="assemblyAuto"]:not(:checked)) .pcost-uwg, .project-cost-step-body:has(input[name="assemblyAuto"]:not(:checked)) .pcost-uwg { display: flex; }

/* === 1. PASEK TRYBU (.k-tbar) i przełącznik .k-seg2 === */
.pcost-tbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); margin: 0 0 var(--s-3); }
.pcost-tbar > .pcost-seg2 { flex: 0 1 420px; min-width: 240px; }
.pcost-tbar > .pcost-tbk { flex: 0 1 240px; min-width: 180px; }
.pcost-tbar:has(input[name="transportCalculationMode"][value="load"]) > .pcost-tbk, .pcost-tbar:has(input[name="assemblyAuto"]:checked) > .pcost-tbk { display: none; }
.pcost-seg2 { display: flex; gap: 2px; min-width: 0; padding: 3px; border-radius: var(--r); background: var(--surface-3); }
.pcost-seg2 > button { flex: 1 1 0; min-height: var(--h-control); padding: 0 var(--s-2); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-muted); font: inherit; font-size: var(--t-sm); font-weight: var(--w-bold); white-space: nowrap; cursor: pointer; transition: background .12s, color .12s; }
.pcost-seg2 > button:hover { color: var(--text); }
.pcost-seg2 > button.on { background: var(--surface); color: var(--text); box-shadow: var(--cien-1); }
.pcost-seg2 > button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* === 2. SEKCJA-KARTA (.k-sk): nagłówek, kwota, akcje === */
.pcost-sk > header .pcost-ska, .pcost-ska { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s-2); }
.pcost-skk { color: var(--text); font-size: var(--t-base); font-weight: var(--w-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pcost-skk .kwota-waluta { font-size: var(--t-xs); font-weight: var(--w-bold); color: var(--text-faint); }
.pcost-skr { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.pcost-skr > .sp { flex: 1; }
.pcost-sk .pcost-skr .project-cost-roundtrip-switch { position: static; }
.pcost-dod { display: flex; }
.pcost-tbp { margin: 0; padding: var(--s-3); color: var(--text-faint); font-size: var(--t-sm); text-align: center; }
.pcost-mini-et { display: inline-flex; }
.pcost-mini { height: var(--h-control); padding: 0 var(--s-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; font-size: var(--t-sm); }

/* Sekcje będące <details> (Zakwaterowanie, Dojazd ekipy): summary = nagłówek sekcji (tytuł + podpis po lewej, kwota po prawej, szewron) */
.pcost-sk.project-cost-collapsible > summary { display: flex; align-items: center; gap: var(--s-3); min-height: 0; padding: 0; }
.pcost-sk.project-cost-collapsible:has(.project-cost-roundtrip-switch) > summary { min-height: 0; padding-right: 0; }
.pcost-sk.project-cost-collapsible > summary > span { display: block; grid-column: auto; }
.pcost-sk.project-cost-collapsible > summary > .pcost-skt { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.pcost-sk.project-cost-collapsible > summary::after { content: ""; flex: none; width: 8px; height: 8px; border: solid var(--text-faint); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s cubic-bezier(.25, 1, .5, 1); }
.pcost-sk.project-cost-collapsible[open] > summary::after { transform: rotate(-135deg); }
.pcost-skt > b { color: var(--text); font-size: var(--t-base); font-weight: var(--w-strong); }
.pcost-skt > small { color: var(--text-faint); font-size: var(--t-xs); }

/* === 3. POLA: .pcost-pola / .pcost-pole (sekcje) i .pcost-lgf (karta odcinka) === */
.pcost-pola { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-3); align-items: end; }
.pcost-pole, .pcost-lgf { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.pcost-pl, .pcost-lgf-et { display: flex; align-items: center; gap: var(--s-1); color: var(--text-faint); font-size: var(--t-xs); font-weight: var(--w-bold); }
.pcost-pole > :is(input, select), .pcost-lgf > :is(input, select), .pcost-lgf > .pcost-ia > input { height: var(--h-control); width: 100%; min-width: 0; padding: 0 var(--s-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; font-size: var(--t-base); }
.pcost-pole > :is(input, select):focus, .pcost-lgf > :is(input, select):focus, .pcost-lgf > .pcost-ia > input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.pcost-pole input.num, .pcost-lgf input.num, .pcost-ia > input { text-align: right; font-variant-numeric: tabular-nums; }
.pcost-pole input[readonly], .pcost-lgf input[readonly] { background: var(--surface-2); color: var(--text-muted); }
.pcost-pole > :is(.combo, .currency-field), .pcost-lgf > :is(.combo, .currency-field) { width: 100%; min-width: 0; }

/* === 4. ODCINEK = KARTA (.k-lg) === */
.pcost-lgl { display: flex; flex-direction: column; gap: var(--s-2); }
.pcost-lg { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--surface-2); }
.pcost-lg.bl { border-color: var(--danger); }
.pcost-lgh { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); min-width: 0; }
.pcost-lgh > .pcost-seg2 { order: 5; flex: 1 1 100%; }
.pcost-lgn { flex: 1 1 0; min-width: 0; }
.pcost-odc { width: 100%; min-height: var(--h-control); padding: 0 var(--s-2); border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); font: inherit; font-size: var(--t-sm); font-weight: var(--w-bold); text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.pcost-odc.is-edyt { border-style: solid; background: var(--surface); cursor: text; }
.pcost-lgk { color: var(--text); font-size: var(--t-base); font-weight: var(--w-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pcost-lgk .kwota-waluta { font-size: var(--t-xs); font-weight: var(--w-bold); color: var(--text-faint); }
.pcost-x { display: grid; flex: none; place-items: center; width: var(--h-control); height: var(--h-control); padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-faint); cursor: pointer; }
.pcost-x:hover { background: var(--danger-soft); color: var(--danger); }
.pcost-x .icon { width: 16px; height: 16px; }
.pcost-lgb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-3); align-items: end; }
.pcost-lgb > .pcost-seg2, .pcost-lgb > .w2 { grid-column: 1 / -1; }
.pcost-lgb > input[type="hidden"] { display: none; }
.pcost-lgf .pcost-seg2 { width: 100%; }
.pcost-ia { display: flex; gap: var(--s-1); min-width: 0; }
.pcost-ia > input { flex: 1 1 0; }
.pcost-am { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 64px; min-height: var(--h-control); padding: 0 var(--s-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ok); font-size: var(--t-xs); font-weight: var(--w-bold); cursor: pointer; }
.pcost-am > em { font-style: normal; }
.pcost-am:has(input:not(:checked)) { border-color: var(--warn-strong); color: var(--warn-strong); }
.pcost-am:has(input:disabled) { opacity: .5; cursor: default; }
.pcost-lgo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); margin: 0; color: var(--text-faint); font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.pcost-lgo:empty { display: none; }
.pcost-lgo.bl { color: var(--danger); font-weight: var(--w-strong); }
.pcost-lg .pcost-src { font-size: var(--t-xs); }

/* Powrót materiału: pola w sekcji, wyłączony powrót chowa pola */
.pcost-sk-pow:has(input[type="checkbox"][name="returnTransportEnabled"]:not(:checked)) > .pcost-pow { display: none; }
.pcost-sk-pow > .project-cost-return-off { margin: 0; border: 0; padding: var(--s-1) 0 0; text-align: left; }

/* === 5. PRACE Z ZESTAWIENIA (.k-pzl / .k-pzr) i wyniki (.k-wy2) === */
.pcost-pzl { display: flex; flex-direction: column; overflow: clip; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--surface); }
.pcost-pzr { display: grid; grid-template-columns: minmax(0, 1fr) 110px 150px; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-top: 1px solid var(--line-soft); }
.pcost-pzr:first-child { border-top: 0; }
.pcost-pzn { display: flex; flex-direction: column; min-width: 0; }
.pcost-pzn > b { font-size: var(--t-base); font-weight: var(--w-bold); }
.pcost-pzn small { color: var(--text-faint); font-size: var(--t-xs); }
.pcost-pzn .project-cost-rate-alert { color: var(--danger); }
.pcost-pzr.bl .pcost-pzn > b { color: var(--danger); }
.pcost-pzq { text-align: right; color: var(--text-muted); font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.pcost-pzk { text-align: right; font-size: var(--t-base); font-weight: var(--w-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pcost-pzk .kwota-waluta { font-size: var(--t-xs); font-weight: var(--w-bold); color: var(--text-faint); }
.pcost-wy2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--s-1); }
.pcost-wy2 > div { display: flex; flex-direction: column; gap: 2px; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: var(--surface-2); }
.pcost-wy2 span { color: var(--text-faint); font-size: var(--t-xs); }
.pcost-wy2 :is(b, strong) { font-size: var(--t-base); font-weight: var(--w-strong); font-variant-numeric: tabular-nums; }

/* === 6. KOMPUTER: edytor ≥ 761 px === */
@container ked (min-width: 761px) {
  .pcost-lg.droga > .pcost-lgb { grid-template-columns: minmax(0, 1fr) 110px 150px; }
  .pcost-lg:is(.morze, .d2d) > .pcost-lgb { grid-template-columns: minmax(0, 1fr) 110px; }
  .pcost-lgh > .pcost-seg2 { order: 0; flex: 0 0 320px; }
  .pcost-lgb > .w2 { grid-column: 1; }
  .pcost-pow { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 90px 110px; }
  .pcost-pow > .w2 { grid-column: auto; }
}
@container ked (max-width: 760px) {
  .pcost-pzr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n k" "n q"; gap: 2px var(--s-3); }
  .pcost-pzn { grid-area: n; }
  .pcost-pzk { grid-area: k; }
  .pcost-pzq { grid-area: q; font-size: var(--t-xs); }
}

/* === 7. TABLET / TELEFON: dotyk ≥ 44 px === */
@media (max-width: 1180px) {
  .pcost-seg2 > button { min-height: 44px; }
  .pcost-x { width: 44px; height: 44px; }
  .pcost-pole > :is(input, select), .pcost-lgf > :is(input, select), .pcost-lgf > .pcost-ia > input, .pcost-am, .pcost-mini { height: 44px; min-height: 44px; }
}
@media (max-width: 640px) {
  .pcost-tbar > .pcost-seg2 { flex: 1 1 100%; }
  .pcost-sk > header .pcost-ska .button { flex: 1 1 100%; }
}
.pcost-ekipa-info { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--text-faint); font-size: var(--t-xs); }
@media (max-width: 640px) {
  .pcost-sk > header .pcost-ska { flex: 1 1 100%; justify-content: stretch; }
  .pcost-sk > header .pcost-ska > .pcost-mini-et { flex: 1 1 100%; }
  .pcost-sk > header .pcost-ska > .pcost-mini-et > :is(select, .combo) { width: 100%; }
}
