/* FJN System — E1-03 variants, E1-04 correction (block 2). Loaded after fjn-screens-e1.css. */

/* ---------- Common ---------- */
.fjn-full { padding-bottom: 0; }
.fjn-full--step1 { max-width: 960px; }
/* Footer at the bottom of the window also when the page is short (as in the design) */
.fjn-full { min-height: calc(100vh - var(--fjn-topbar-h)); }
.fjn-full > .fjn-form-footer { margin-top: auto; }
@media (max-width: 767px) { .fjn-full { min-height: calc(100vh - var(--fjn-topbar-h-m) - var(--fjn-bottomnav-h)); } }
.fjn-full__set { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.fjn-full__step { font-size: 14px; line-height: 20px; color: var(--fjn-text-2); }
.fjn-full__card-head { display: flex; flex-direction: column; gap: 2px; }
.fjn-full__card-head .fjn-card__title { margin: 0; }
.fjn-full__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--fjn-sp-4); }
.fjn-full__slot { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fjn-full__slot[hidden] { display: none; }
.fjn-full__add-link { align-self: flex-start; font-size: 14px; font-weight: var(--fjn-fw-bold); text-decoration: none; }

/* Chosen customer: name, phone and „Zmień” in one box (ModWyceny · nowa) */
.fjn-full-picked {
  display: flex; align-items: center; gap: 10px; min-height: var(--fjn-ctl); padding: 4px 4px 4px var(--fjn-sp-3);
  border: 1px solid var(--fjn-border-strong); border-radius: var(--fjn-r-md); background: var(--fjn-surface); color: var(--fjn-text-2);
}
.fjn-full-picked__text { flex: 1; min-width: 0; font-size: var(--fjn-fs-body); color: var(--fjn-text); }
.fjn-full-picked .fjn-btn { flex: none; }

/* ---------- Step 1: „Felgi” — table on K/T, cards on M ---------- */
.fjn-full-wheels__head {
  display: flex; justify-content: space-between; align-items: center; gap: var(--fjn-sp-3); flex-wrap: wrap;
  padding: var(--fjn-sp-4) var(--fjn-sp-5);
}
.fjn-full-wheels__head .fjn-btn { gap: 6px; white-space: nowrap; }
.fjn-full-wheels__cols, .fjn-full-wheel {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.4fr) 110px; align-items: center;
}
.fjn-full-wheels__cols {
  height: 36px; background: var(--fjn-bg); border-top: 1px solid var(--fjn-border); border-bottom: 1px solid var(--fjn-border);
  font-size: var(--fjn-fs-label); font-weight: var(--fjn-fw-bold); letter-spacing: .04em; text-transform: uppercase; color: var(--fjn-text-2);
}
.fjn-full-wheels__cols span { padding: 0 10px; }
.fjn-full-wheels__cols span:first-child { padding-left: var(--fjn-sp-5); }
.fjn-full-wheel { min-height: 56px; border-bottom: 1px solid var(--fjn-surface-2); }
.fjn-full-wheel:last-child { border-bottom: 0; }
.fjn-full-wheel[hidden] { display: none; }
.fjn-full-wheel__id { padding: 0 var(--fjn-sp-5); }
.fjn-full-wheel__chip {
  padding: 3px 8px; border-radius: var(--fjn-r-sm); background: var(--fjn-text); color: var(--fjn-text-inverse);
  font: var(--fjn-fw-bold) 15px var(--fjn-font-mono);
}
.fjn-full-wheel__cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: var(--fjn-sp-2) 10px; }
.fjn-full-wheel__label {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.fjn-full-wheel__scope { flex-direction: row; flex-wrap: wrap; align-items: center; }
.fjn-full-wheel__scope .fjn-select { width: auto; max-width: 100%; height: 36px; font-size: 14px; }
.fjn-full-wheel__scope .fjn-check { min-height: 36px; font-size: 14px; }
.fjn-full-wheel__scope .fjn-tag { height: 28px; display: inline-flex; align-items: center; }
.fjn-full-wheel__photos { display: flex; flex-direction: column; gap: 6px; padding: 0 var(--fjn-sp-5) 0 10px; }
.fjn-full-wheel__photo-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--fjn-sp-2); border-radius: var(--fjn-r-md);
  color: var(--fjn-brand-600); font-size: 14px; font-weight: var(--fjn-fw-bold); white-space: nowrap; cursor: pointer;
}
.fjn-full-wheel__photo-btn:hover { background: var(--fjn-brand-50); }
.fjn-full-wheel__photos:focus-within .fjn-full-wheel__photo-btn { box-shadow: var(--fjn-focus-btn); }

@media (max-width: 1279px) {
  .fjn-full-wheels__cols, .fjn-full-wheel { grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1.4fr) 100px; }
}
@media (max-width: 767px) {
  .fjn-full-wheels__head { padding: var(--fjn-sp-4); }
  .fjn-full-wheel { grid-template-columns: minmax(0, 1fr); gap: var(--fjn-sp-2); padding: var(--fjn-sp-3) var(--fjn-sp-4); }
  .fjn-full-wheel__id, .fjn-full-wheel__cell, .fjn-full-wheel__photos { padding: 0; }
  .fjn-full-wheel__label {
    position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto;
    font-size: 14px; font-weight: var(--fjn-fw-bold);
  }
  .fjn-full-wheel__label--m { flex-basis: 100%; }
  .fjn-full-wheel__scope .fjn-select { flex: 1 1 140px; height: var(--fjn-ctl); }
}

/* ---------- Step 2: variant cards ---------- */
.fjn-full-variants { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--fjn-sp-4); align-items: start; }
@media (min-width: 1280px) { .fjn-full-variants { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fjn-full-variants__error { grid-column: 1 / -1; }
.fjn-full-variant {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--fjn-surface); border: 1px solid var(--fjn-border); border-radius: var(--fjn-r-lg);
}
.fjn-full-variant__head {
  display: flex; align-items: center; gap: 10px; padding: 14px var(--fjn-sp-4); border-bottom: 1px solid var(--fjn-surface-2);
}
.fjn-full-variant__head .fjn-btn--icon { width: 36px; height: 36px; }
.fjn-full-variant__letter {
  display: flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px;
  border-radius: var(--fjn-r-md); background: var(--fjn-brand-100); color: var(--fjn-brand-700);
  font: var(--fjn-fw-bold) 14px var(--fjn-font-mono);
}
.fjn-full-variant__name-form { flex: 1; min-width: 0; }
.fjn-full-variant__name {
  flex: 1; min-width: 0; width: 100%; font-size: 16px; font-weight: var(--fjn-fw-bold);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
input.fjn-full-variant__name {
  height: 36px; padding: 0 6px; margin-left: -6px; border: 1px solid transparent; border-radius: var(--fjn-r-md);
  background: transparent; color: var(--fjn-text); font-family: inherit;
}
input.fjn-full-variant__name:hover { border-color: var(--fjn-border); }
input.fjn-full-variant__name:focus { outline: none; border-color: var(--fjn-brand-600); box-shadow: var(--fjn-focus); background: var(--fjn-surface); }
input.fjn-full-variant__name::placeholder { color: var(--fjn-text-3); font-weight: var(--fjn-fw-regular); }

.fjn-full-line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--fjn-sp-3);
  padding: var(--fjn-sp-3) var(--fjn-sp-4); border-bottom: 1px solid var(--fjn-surface-2);
}
.fjn-full-line__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fjn-full-line__text b { font-size: 15px; }
.fjn-full-line__value { font-size: 15px; white-space: nowrap; text-align: right; }
.fjn-full-line__calc {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  font: 14px var(--fjn-font-mono); color: var(--fjn-text-2);
}
.fjn-full-line__qty-form { display: contents; }
.fjn-full-line__qty {
  width: 40px; height: 28px; padding: 0 4px; border: 1px solid var(--fjn-border); border-radius: var(--fjn-r-sm);
  background: var(--fjn-surface); color: var(--fjn-text); font: 14px var(--fjn-font-mono); text-align: right;
  appearance: textfield; -moz-appearance: textfield;
}
.fjn-full-line__qty::-webkit-outer-spin-button, .fjn-full-line__qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fjn-full-line__qty:hover { border-color: var(--fjn-border-strong); }
.fjn-full-line__qty:focus { outline: none; border-color: var(--fjn-brand-600); box-shadow: var(--fjn-focus); }
.fjn-full-line__old { color: var(--fjn-text-3); }
.fjn-full-line__new { color: var(--fjn-text); }
.fjn-full-line__tag {
  padding: 1px 6px; border-radius: var(--fjn-r-sm); background: var(--fjn-warning-100); color: var(--fjn-warning-700);
  font: var(--fjn-fw-bold) 12px var(--fjn-font);
}
.fjn-full-line__actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.fjn-full-line__correct {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 var(--fjn-sp-2); border-radius: var(--fjn-r-md);
  color: var(--fjn-brand-600); font: var(--fjn-fw-bold) 13px var(--fjn-font); text-decoration: none;
}
.fjn-full-line__correct:hover { background: var(--fjn-brand-50); color: var(--fjn-brand-700); }
.fjn-full-line__actions .fjn-btn--icon { width: 32px; height: 32px; }
.fjn-full-variant__empty {
  padding: var(--fjn-sp-3) var(--fjn-sp-4); border-bottom: 1px solid var(--fjn-surface-2);
  font-size: var(--fjn-fs-small); color: var(--fjn-text-2);
}
.fjn-full-variant__add { padding: 10px var(--fjn-sp-4); border-bottom: 1px solid var(--fjn-surface-2); }
.fjn-full-variant__add a { font-size: 14px; font-weight: var(--fjn-fw-bold); text-decoration: none; }
.fjn-full-variant__totals {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px var(--fjn-sp-3); margin: 0;
  padding: var(--fjn-sp-3) var(--fjn-sp-4); background: var(--fjn-table-group); font-size: 14px;
}
.fjn-full-variant__totals dt { color: var(--fjn-text-2); }
.fjn-full-variant__totals dd { margin: 0; font-family: var(--fjn-font-mono); text-align: right; white-space: nowrap; }
.fjn-full-variant__totals .fjn-full-variant__gross-label { align-self: center; font-size: 15px; font-weight: var(--fjn-fw-bold); color: var(--fjn-text); }
.fjn-full-variant__totals .fjn-full-variant__gross { font-size: 22px; line-height: 30px; font-weight: var(--fjn-fw-bold); }

.fjn-full-variants__add { display: flex; }
.fjn-full-add-variant {
  display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: var(--fjn-sp-2);
  min-height: 160px; padding: var(--fjn-sp-5); border: 1.5px dashed var(--fjn-border-strong); border-radius: var(--fjn-r-lg);
  background: none; color: var(--fjn-brand-600); font: var(--fjn-fw-bold) 15px var(--fjn-font); cursor: pointer;
}
.fjn-full-add-variant:hover { background: var(--fjn-brand-50); }
.fjn-full-add-variant__hint { font-size: var(--fjn-fs-small); font-weight: var(--fjn-fw-regular); color: var(--fjn-text-2); }

/* ---------- E1-04 correction dialog ---------- */
.fjn-full-correct__prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.fjn-full-correct__list {
  display: flex; align-items: center; justify-content: flex-end; height: var(--fjn-ctl); padding: 0 var(--fjn-sp-3);
  border: 1px solid var(--fjn-border); border-radius: var(--fjn-r-md); background: var(--fjn-bg);
  font: 15px var(--fjn-font-mono); color: var(--fjn-text-2);
}
.fjn-full-correct__prices .fjn-field--disabled .fjn-field__label { color: var(--fjn-text-2); }

/* ---------- E1-03a „Dodaj pozycję z cennika” (D107): 600 × 640 on K/T, full screen on M ---------- */
.fjn-full-addline { width: min(600px, calc(100vw - 32px)); height: min(640px, calc(100vh - 32px)); overflow: hidden; }
.fjn-full-addline[open]:not(:modal), .fjn-full-addline[open]:not(:modal) .fjn-full-addline__list { height: auto; max-height: none; overflow: visible; }
.fjn-full-addline > form { display: flex; flex-direction: column; height: 100%; }
.fjn-full-addline [hidden] { display: none !important; }
.fjn-full-addline__head { display: flex; align-items: center; gap: var(--fjn-sp-3); padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--fjn-surface-2); }
.fjn-full-addline__title { font-size: 19px; line-height: 26px; }
.fjn-full-addline__close { width: 44px; height: 44px; color: var(--fjn-text-2); }
.fjn-full-addline__filters { display: flex; flex-wrap: wrap; gap: 10px; padding: var(--fjn-sp-3) var(--fjn-sp-5); border-bottom: 1px solid var(--fjn-surface-2); }
.fjn-full-addline__search {
  display: flex; flex: 1 1 200px; align-items: center; gap: 10px; height: var(--fjn-ctl); padding: 0 var(--fjn-sp-3);
  border: 1px solid var(--fjn-border-strong); border-radius: var(--fjn-r-md); background: var(--fjn-surface); color: var(--fjn-text-2);
}
.fjn-full-addline__search:focus-within { border-color: var(--fjn-brand-600); box-shadow: var(--fjn-focus); }
.fjn-full-addline__search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 16px var(--fjn-font); color: var(--fjn-text); }
.fjn-full-addline__search input::placeholder { color: var(--fjn-text-3); }
.fjn-full-addline__search input:focus-visible { box-shadow: none; }
.fjn-full-addline .fjn-filter__button { height: var(--fjn-ctl); font-size: 15px; }
.fjn-full-addline__error { margin: var(--fjn-sp-3) var(--fjn-sp-5) 0; }
.fjn-full-addline__list { flex: 1; min-height: 0; overflow-y: auto; }
.fjn-full-addline__group-name {
  margin: 0; padding: 10px var(--fjn-sp-5) 6px; background: var(--fjn-table-group); color: var(--fjn-text-2);
  font: var(--fjn-fw-bold) 11px/1 var(--fjn-font-mono); letter-spacing: .06em; text-transform: uppercase;
}
.fjn-full-addline__row {
  display: flex; align-items: center; gap: var(--fjn-sp-3); min-height: 64px; padding: 8px 12px 8px 20px;
  border-bottom: 1px solid var(--fjn-surface-2);
}
.fjn-full-addline__row--picked { background: var(--fjn-brand-50); }
.fjn-full-addline__row--picked .fjn-full-addline__service { font-weight: var(--fjn-fw-bold); }
.fjn-full-addline__name { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.fjn-full-addline__service { font-size: 16px; line-height: 21px; }
.fjn-full-addline__unit { font-size: var(--fjn-fs-small); color: var(--fjn-text-2); }
.fjn-full-addline__price { font-size: 15px; white-space: nowrap; }
.fjn-full-addline__pick {
  display: flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1px solid var(--fjn-border-strong); border-radius: 8px; background: var(--fjn-surface); color: var(--fjn-brand-600); cursor: pointer;
}
.fjn-full-addline__pick:hover { background: var(--fjn-brand-50); }
.fjn-full-addline__stepper { display: flex; flex: none; align-items: center; overflow: hidden; border: 1px solid var(--fjn-brand-600); border-radius: 8px; }
.fjn-full-addline__stepper button {
  width: 44px; height: 44px; border: 0; background: var(--fjn-brand-100); color: var(--fjn-brand-600);
  font: var(--fjn-fw-bold) 22px/1 var(--fjn-font); cursor: pointer;
}
.fjn-full-addline__stepper .fjn-full-addline__plus { background: var(--fjn-brand-600); color: var(--fjn-text-inverse); }
.fjn-full-addline__count { width: 36px; text-align: center; font: var(--fjn-fw-bold) 17px var(--fjn-font-mono); }
.fjn-full-addline__empty { display: flex; flex-direction: column; align-items: center; gap: var(--fjn-sp-2); padding: 36px 24px; text-align: center; }
.fjn-full-addline__empty b { font-size: 17px; }
.fjn-full-addline__empty span { font-size: 15px; line-height: 22px; color: var(--fjn-text-2); }
.fjn-full-addline__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: var(--fjn-sp-3) var(--fjn-sp-5);
  border-top: 1px solid var(--fjn-border); background: var(--fjn-surface);
}
.fjn-full-addline__summary { flex: 1 1 100%; font-size: 15px; color: var(--fjn-text-2); }
.fjn-full-addline__foot .fjn-btn:disabled { background: var(--fjn-btn-disabled-bg); color: var(--fjn-text-disabled); }
@media (max-width: 1279px), (pointer: coarse) { .fjn-full-addline__foot .fjn-btn { height: 48px; } }
@media (max-width: 767px) {
  .fjn-full-addline { width: 100%; height: 100%; }
  .fjn-full-addline__head { padding-left: var(--fjn-sp-5); }
  .fjn-full-addline__foot .fjn-btn { flex: 1; }
  .fjn-full-addline .fjn-filter { flex: none; }
}
