/*
 * Flux office · Vânzări (owned by the sales work): the configurator's four steps, the product picker, the form
 * groups, the drawing and price panel, the floating price bar, the colour window, an offer's lines, the offer page
 * and the products for sale. Tokens come from fx-tokens.css, motion from fx-motion.css (docs/DESIGN.md says why).
 * Loaded after fx-inputs.css and fx-pricing.css. Local keyframes are fx-sales-*; script state classes is-fx-sales-*.
 *
 * The factory's colour appears only on the main button (add the position, accept the offer), on errors and on
 * nothing else: choices, chips, the chosen colour and the chosen product are graphite.
 */

/* ---------- Motion of this area ---------- */
@keyframes fx-sales-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fx-sales-step { from { opacity: 0; transform: translateY(18px) scale(0.99); } }
@keyframes fx-sales-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes fx-sales-pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
@keyframes fx-sales-sheet { from { transform: translateY(100%); } }
@keyframes fx-sales-dialog { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes fx-sales-bar { from { opacity: 0; transform: translateY(calc(100% + 16px)); } }
@keyframes fx-sales-done { 0% { opacity: 0; transform: scale(0.6); } 60% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes fx-sales-fresh { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- The page: four steps, one under the other ---------- */
.fx-cfg { display: grid; gap: var(--fx-gap); min-width: 0; }
.fx-cfg-muted { margin: 0; color: var(--fx-ink-3); font-size: var(--fx-fs-14); line-height: var(--fx-lh-body); }
.fx-cfg-ico { width: 1.125rem; height: 1.125rem; flex: none; }

.fx-step {
    display: grid;
    gap: var(--fx-s-4);
    min-width: 0;
    padding: var(--fx-pad-panel);
    border-radius: var(--fx-r-panel);
    background: var(--fx-surface);
    box-shadow: var(--fx-shadow-1);
}
.fx-step-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--fx-s-3); flex-wrap: wrap; min-width: 0; }
.fx-step-title {
    display: flex;
    align-items: center;
    gap: var(--fx-s-3);
    min-width: 0;
    margin: 0;
    font-size: var(--fx-fs-18);
    font-weight: var(--fx-fw-strong);
    font-stretch: var(--fx-wdth-head);
    letter-spacing: var(--fx-track-head);
    line-height: var(--fx-lh-snug);
    color: var(--fx-graphite);
}
.fx-step-no {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--fx-graphite);
    color: var(--fx-on-dark);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-bold);
    font-stretch: var(--fx-wdth-num);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}
.fx-step-tick { display: none; width: 1rem; height: 1rem; }
.fx-step-no.is-done .fx-step-tick { display: block; animation: fx-sales-done var(--fx-dur-4) var(--fx-ease-spring) backwards; }
.fx-step-no.is-done .fx-step-n { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fx-step-count {
    display: inline-grid;
    place-items: center;
    min-width: 1.75rem;
    height: 1.5rem;
    padding: 0 var(--fx-s-2);
    border-radius: var(--fx-r-pill);
    background: var(--fx-sunk);
    box-shadow: var(--fx-shadow-inset);
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-semibold);
    font-stretch: var(--fx-wdth-num);
}
.fx-step-end { display: flex; justify-content: flex-end; }

/* Step 3 is the workbench: no panel of its own; its groups and the price float on the page. */
.fx-step.fx-step-config { padding: var(--fx-s-1) 0 0; background: none; box-shadow: none; border-radius: 0; }
.fx-step-config > .fx-step-bar { padding-inline: var(--fx-s-1); }
/* A new product opened after a pick: the workbench rises in, its groups one after another. */
html.fx-motion .fx-step.fx-step-config.is-fx-new { animation: fx-sales-step var(--fx-dur-4) var(--fx-ease-enter) backwards; }

/* ---------- Buttons of this area ---------- */
.fx-cfg-change {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--fx-s-2);
    min-height: var(--fx-tap);
    padding: 0 var(--fx-s-4);
    border-radius: var(--fx-r-ctl);
    background: var(--fx-surface);
    box-shadow: inset 0 0 0 1px var(--fx-line-2), 0 1px 2px rgb(31 35 40 / 0.05);
    color: var(--fx-ink);
    font-size: var(--fx-fs-14);
    font-weight: var(--fx-fw-semibold);
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color var(--fx-dur-2) var(--fx-ease-out), box-shadow var(--fx-dur-2) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
}
.fx-cfg-change.is-small { min-height: 2.25rem; padding: 0 var(--fx-s-3); font-size: var(--fx-fs-13); }
.fx-cfg-change-ico { width: 1.125rem; height: 1.125rem; color: var(--fx-ink-3); flex: none; }
.fx-cfg-change:active { transform: scale(0.97); }
.fx-cfg-change:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) {
    .fx-cfg-change:hover { background: var(--fx-hover); box-shadow: inset 0 0 0 1px var(--fx-ink-disabled), 0 1px 2px rgb(31 35 40 / 0.05); }
}
@media (pointer: coarse) { .fx-cfg-change.is-small { min-height: var(--fx-tap); } }

/* The main button: the factory's colour, the brightest and highest control on the screen. */
.fx-cfg-go {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--fx-s-2);
    min-height: var(--fx-tap-main);
    padding: 0 var(--fx-s-6);
    border-radius: var(--fx-r-ctl);
    background: var(--fx-brand);
    color: var(--fx-on-brand);
    box-shadow: var(--fx-shadow-brand);
    font-size: var(--fx-fs-16);
    font-weight: var(--fx-fw-semibold);
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color var(--fx-dur-2) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out), box-shadow var(--fx-dur-2) var(--fx-ease-out);
}
.fx-cfg-go:active:not(:disabled) { transform: scale(0.97); background: var(--fx-brand-press); }
.fx-cfg-go:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
    .fx-cfg-go:hover:not(:disabled) { background: var(--fx-brand-hover); }
}
.fx-cfg-go:disabled { background: var(--fx-sunk); color: var(--fx-ink-3); box-shadow: inset 0 0 0 1px var(--fx-line); cursor: not-allowed; }
.fx-cfg-go-link { gap: var(--fx-s-2); }
.fx-cfg-go-link.is-quiet { background: var(--fx-surface); color: var(--fx-ink); box-shadow: inset 0 0 0 1px var(--fx-line-2), 0 1px 2px rgb(31 35 40 / 0.05); }
@media (hover: hover) and (pointer: fine) { .fx-cfg-go-link.is-quiet:hover { background: var(--fx-hover); } }

/* Saving: a spinner after 200ms; saved: the button turns into a green tick while the next page loads. */
/* Spinners shown by wire:loading.delay.<display>: Livewire's own CSS hides only the plain spellings, so hide these here; it
   sets an inline display while loading and "none" after. */
.fx-cfg-go-wait, .fx-cfg-busy, .fx-pick-wait { display: none; }
.fx-cfg-go-done { display: none; align-items: center; gap: var(--fx-s-2); }
.is-fx-sales-saved.fx-cfg-go, .is-fx-sales-saved.fx-cfg-bar-go { background: var(--fx-ok-fill); color: var(--fx-on-dark); box-shadow: 0 8px 18px -8px color-mix(in oklab, var(--fx-ok-fill) 70%, transparent); }
.is-fx-sales-saved .fx-cfg-go-label, .is-fx-sales-saved .fx-cfg-go-wait { display: none !important; }   /* over wire:loading's inline display */
.is-fx-sales-saved .fx-cfg-go-done { display: inline-flex; animation: fx-sales-done var(--fx-dur-4) var(--fx-ease-spring) backwards; }

/* A tag (changing a position) */
.fx-cfg-tag {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 var(--fx-s-3);
    border-radius: var(--fx-r-pill);
    background: var(--fx-st-road-bg);
    color: var(--fx-st-road-text);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-semibold);
}

/* ---------- Step 1: the client ---------- */
/* The search for a client, with its answers in a floating list */
.fx-cfg-search { position: relative; }
.fx-cfg-search-ico { position: absolute; left: var(--fx-s-3); top: 50%; width: 1.25rem; height: 1.25rem; transform: translateY(-50%); color: var(--fx-ink-3); pointer-events: none; }
.fx-cfg-search .fx-cfg-input { padding-left: 2.5rem; }
.fx-cfg-matches {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + var(--fx-s-2));
    z-index: var(--fx-z-dropdown);
    display: grid;
    gap: 2px;
    max-height: min(22rem, 50vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: var(--fx-s-1);
    list-style: none;
    border-radius: var(--fx-r-card);
    background: var(--fx-surface);
    box-shadow: var(--fx-shadow-3);
    transform-origin: top center;
}
html.fx-motion .fx-cfg-matches { animation: fx-sales-pop var(--fx-dur-3) var(--fx-ease-enter) backwards; }
.fx-cfg-matches button {
    display: flex;
    align-items: baseline;
    gap: var(--fx-s-2);
    width: 100%;
    min-height: var(--fx-tap);
    padding: var(--fx-s-2) var(--fx-s-3);
    border-radius: calc(var(--fx-r-card) - 4px);
    color: var(--fx-ink);
    text-align: left;
    font-weight: var(--fx-fw-medium);
    transition: background-color var(--fx-dur-1) var(--fx-ease-out);
}
.fx-cfg-matches button:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: -2px; }
.fx-cfg-matches button:active { background: var(--fx-sunk); }
@media (hover: hover) and (pointer: fine) { .fx-cfg-matches button:hover { background: var(--fx-hover); } }
.fx-cfg-matches small { color: var(--fx-ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Step 3: the form, one floating panel per group ---------- */
.fx-cfg-grid { display: grid; gap: var(--fx-gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) { .fx-cfg-grid { grid-template-columns: minmax(0, 1fr) minmax(19rem, 25rem); } }
@media (min-width: 1280px) { .fx-cfg-grid { grid-template-columns: minmax(0, 1fr) minmax(22rem, 28rem); } }
.fx-cfg-form { display: grid; gap: var(--fx-gap); align-content: start; min-width: 0; }

.fx-row {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: var(--fx-s-3) var(--fx-s-6);
    min-width: 0;
    padding: var(--fx-pad-panel);
    border-radius: var(--fx-r-panel);
    background: var(--fx-surface);
    box-shadow: var(--fx-shadow-1);
}
@media (max-width: 767.98px) { .fx-row { grid-template-columns: minmax(0, 1fr); gap: var(--fx-s-3); } }
.fx-row-label {
    padding-top: 2px;
    font-size: var(--fx-fs-16);
    font-weight: var(--fx-fw-strong);
    font-stretch: var(--fx-wdth-head);
    letter-spacing: var(--fx-track-head);
    line-height: var(--fx-lh-snug);
    color: var(--fx-graphite);
}
.fx-row-body { display: grid; gap: var(--fx-s-4); min-width: 0; }
.fx-cfg-fields, .fx-row .fx-cfg-fields { display: grid; gap: var(--fx-s-4); grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr)); }
.fx-cfg-field { min-width: 0; }
.fx-cfg-field.is-wide { grid-column: 1 / -1; }

/* Groups rise one after another when the product opens; a group or a field that a choice shows fades in. */
html.fx-motion .fx-row { animation: fx-sales-rise var(--fx-dur-4) var(--fx-ease-enter) backwards; }
html.fx-motion .fx-step:not(.is-fx-done) .fx-row { animation-delay: calc(60ms + var(--fx-row-i, 0) * var(--fx-stagger)); }
html.fx-motion .fx-row .fx-cfg-field,
html.fx-motion .fx-chips-hint,
html.fx-motion .fx-chip { animation: fx-sales-in var(--fx-dur-3) var(--fx-ease-out) backwards; }

/* Labels, fields, help */
.fx-cfg-label { display: block; margin-bottom: 6px; font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); line-height: 1.3; color: var(--fx-ink-2); }
.fx-cfg-unit { font-weight: var(--fx-fw-regular); color: var(--fx-ink-3); }
.fx-cfg-input {
    width: 100%;
    min-height: var(--fx-tap);
    padding: 0 var(--fx-s-3);
    border: 1px solid var(--fx-line-2);
    border-radius: var(--fx-r-ctl);
    background: var(--fx-surface);
    box-shadow: 0 1px 2px rgb(31 35 40 / 0.04);
    color: var(--fx-ink);
    font: inherit;
    font-size: var(--fx-fs-16);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    transition: border-color var(--fx-dur-2) var(--fx-ease-out), box-shadow var(--fx-dur-2) var(--fx-ease-out);
}
.fx-cfg-input::placeholder { color: var(--fx-ink-3); opacity: 1; }
@media (hover: hover) and (pointer: fine) { .fx-cfg-input:hover { border-color: var(--fx-ink-disabled); } }
.fx-cfg-input:focus { outline: none; }
.fx-cfg-input:focus-visible {
    outline: var(--fx-focus-width) solid var(--fx-focus-color);
    outline-offset: 0;
    border-color: var(--fx-graphite);
}
select.fx-cfg-input {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235f6873'%3E%3Cpath fill-rule='evenodd' d='M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.125rem;
    cursor: pointer;
}
input[type="search"].fx-cfg-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235f6873'%3E%3Cpath d='M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z'/%3E%3C/svg%3E") center / 1.125rem no-repeat;
    cursor: pointer;
}
.fx-cfg-help { margin: 6px 0 0; font-size: var(--fx-fs-13); line-height: 1.45; color: var(--fx-ink-3); }

/* Choices: graphite when chosen, and chosen at once when pressed (the server confirms a moment later). */
.fx-cfg-choices { display: flex; flex-wrap: wrap; gap: var(--fx-s-2); }
.fx-cfg-choice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: var(--fx-tap);
    min-width: var(--fx-tap);
    padding: 0 var(--fx-s-4);
    border-radius: var(--fx-r-ctl);
    background: var(--fx-surface);
    box-shadow: inset 0 0 0 1px var(--fx-line-2), 0 1px 2px rgb(31 35 40 / 0.04);
    color: var(--fx-ink);
    font-size: var(--fx-fs-14);
    font-weight: var(--fx-fw-medium);
    line-height: 1.2;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color var(--fx-dur-1) var(--fx-ease-out), color var(--fx-dur-1) var(--fx-ease-out), box-shadow var(--fx-dur-2) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
}
.fx-cfg-choice:active { transform: scale(0.96); }
.fx-cfg-choice:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) { .fx-cfg-choice:not(.is-on):hover { box-shadow: inset 0 0 0 1px var(--fx-ink-3), 0 1px 2px rgb(31 35 40 / 0.04); } }
.fx-cfg-choice.is-on, .fx-cfg-choice[data-pending] {
    background: var(--fx-graphite);
    color: var(--fx-on-dark);
    font-weight: var(--fx-fw-semibold);
    box-shadow: 0 1px 2px rgb(35 31 32 / 0.3), 0 6px 14px -6px rgb(35 31 32 / 0.45);
}
.fx-cfg-choices:has([data-pending]) .fx-cfg-choice.is-on:not([data-pending]) {
    background: var(--fx-surface);
    color: var(--fx-ink);
    font-weight: var(--fx-fw-medium);
    box-shadow: inset 0 0 0 1px var(--fx-line-2);
}

/* A tick box, drawn as one with the rest */
.fx-cfg-toggle { display: inline-flex; align-items: center; gap: var(--fx-s-3); min-height: var(--fx-tap); color: var(--fx-ink); font-size: var(--fx-fs-14); line-height: 1.35; cursor: pointer; touch-action: manipulation; }
.fx-cfg-toggle input {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    width: 1.375rem;
    height: 1.375rem;
    margin: 0;
    border: 1.5px solid var(--fx-line-2);
    border-radius: 7px;
    background: var(--fx-surface) center / 0.875rem no-repeat;
    cursor: pointer;
    transition: background-color var(--fx-dur-1) var(--fx-ease-out), border-color var(--fx-dur-1) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
}
.fx-cfg-toggle input:checked {
    border-color: var(--fx-graphite);
    background-color: var(--fx-graphite);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}
.fx-cfg-toggle input:active { transform: scale(0.9); }
.fx-cfg-toggle input:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) { .fx-cfg-toggle:hover input:not(:checked) { border-color: var(--fx-ink-3); } }

/* Option chips (tap to add) */
.fx-chips-hint { margin: 0; font-size: var(--fx-fs-13); color: var(--fx-ink-3); }
.fx-chips { display: flex; flex-wrap: wrap; gap: var(--fx-s-2); }
.fx-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--fx-tap);
    padding: 0 var(--fx-s-4);
    border-radius: var(--fx-r-pill);
    background: var(--fx-surface);
    box-shadow: inset 0 0 0 1px var(--fx-line-2);
    color: var(--fx-ink);
    font-size: var(--fx-fs-14);
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color var(--fx-dur-1) var(--fx-ease-out), color var(--fx-dur-1) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
}
.fx-chip:active { transform: scale(0.96); }
.fx-chip:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) { .fx-chip:not(.is-on):hover { box-shadow: inset 0 0 0 1px var(--fx-ink-3); } }
.fx-chip.is-on, .fx-chip:not(.is-on)[data-pending] { background: var(--fx-graphite); color: var(--fx-on-dark); box-shadow: 0 1px 2px rgb(35 31 32 / 0.3); font-weight: var(--fx-fw-semibold); }
.fx-chip.is-on[data-pending] { background: var(--fx-surface); color: var(--fx-ink); box-shadow: inset 0 0 0 1px var(--fx-line-2); font-weight: var(--fx-fw-regular); }

/* A field that opens a window of pictures (colours, screen) */
.fx-pickfield {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: var(--fx-tap);
    padding: 4px var(--fx-s-2) 4px 4px;
    border: 1px solid var(--fx-line-2);
    border-radius: var(--fx-r-ctl);
    background: var(--fx-surface);
    box-shadow: 0 1px 2px rgb(31 35 40 / 0.04);
    color: var(--fx-ink);
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color var(--fx-dur-2) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
}
.fx-pickfield:active { transform: scale(0.985); }
.fx-pickfield:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: 1px; border-color: var(--fx-graphite); }
@media (hover: hover) and (pointer: fine) { .fx-pickfield:hover { border-color: var(--fx-ink-disabled); } }
.fx-pickfield img { flex: none; width: 2.75rem; height: 2.125rem; border-radius: 6px; object-fit: cover; background: var(--fx-surface); box-shadow: 0 0 0 1px var(--fx-line); }
.fx-pickfield-text { flex: 1; min-width: 0; padding-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fx-fs-16); }
.fx-pickfield img + .fx-pickfield-text { padding-left: 0; }
.fx-pickfield-go { flex: none; width: 1.25rem; height: 1.25rem; color: var(--fx-ink-3); }

/* The window of pictures: a dialog on a computer, a sheet from the bottom on a phone */
.fx-modal { position: fixed; inset: 0; z-index: var(--fx-z-modal); display: grid; place-items: center; padding: var(--fx-s-4); }
.fx-modal-back { position: absolute; inset: 0; background: var(--fx-scrim); }
html.fx-motion .fx-modal-back { animation: fx-fade-in var(--fx-dur-3) var(--fx-ease-out) backwards; }
.fx-modal-box {
    position: relative;
    display: grid;
    gap: var(--fx-s-3);
    width: min(42rem, 100%);
    max-height: calc(100dvh - 2 * var(--fx-s-6));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--fx-s-5) var(--fx-s-6) var(--fx-s-6);
    border-radius: var(--fx-r-sheet);
    background: var(--fx-surface);
    box-shadow: var(--fx-shadow-4);
}
.fx-modal-box:focus { outline: none; }
html.fx-motion .fx-modal-box { animation: fx-sales-dialog var(--fx-dur-4) var(--fx-ease-enter) backwards; }
.fx-modal-head {
    position: sticky;
    top: calc(-1 * var(--fx-s-5));
    z-index: var(--fx-z-raised);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--fx-s-3);
    margin: calc(-1 * var(--fx-s-5)) calc(-1 * var(--fx-s-6)) 0;
    padding: var(--fx-s-4) var(--fx-s-4) var(--fx-s-2) var(--fx-s-6);
    background: linear-gradient(180deg, var(--fx-surface) 75%, rgb(255 255 255 / 0));
}
.fx-modal-head strong { font-size: var(--fx-fs-18); font-weight: var(--fx-fw-strong); font-stretch: var(--fx-wdth-head); letter-spacing: var(--fx-track-head); color: var(--fx-graphite); }
.fx-modal-close {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: var(--fx-tap);
    height: var(--fx-tap);
    border-radius: 50%;
    background: var(--fx-sunk);
    color: var(--fx-ink-2);
    cursor: pointer;
    transition: background-color var(--fx-dur-1) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
}
.fx-modal-close svg { width: 1.25rem; height: 1.25rem; }
.fx-modal-close:active { transform: scale(0.94); }
.fx-modal-close:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) { .fx-modal-close:hover { background: var(--fx-canvas-deep); color: var(--fx-ink); } }
.fx-modal-group { margin: var(--fx-s-2) 0 0; font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); color: var(--fx-ink-3); }
.fx-modal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: var(--fx-s-3); }
.fx-modal-opt {
    position: relative;
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 6px 6px var(--fx-s-2);
    border-radius: var(--fx-r-card);
    background: var(--fx-surface);
    box-shadow: inset 0 0 0 1px var(--fx-line), 0 1px 2px rgb(31 35 40 / 0.04);
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
    transition: box-shadow var(--fx-dur-2) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
}
.fx-modal-opt:active { transform: scale(0.97); }
.fx-modal-opt:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) { .fx-modal-opt:hover { box-shadow: inset 0 0 0 1px var(--fx-ink-disabled), var(--fx-shadow-2); } }
.fx-modal-opt.is-on { box-shadow: inset 0 0 0 2px var(--fx-graphite), var(--fx-shadow-1); }
.fx-modal-opt img { display: block; width: 100%; height: 4.5rem; border-radius: calc(var(--fx-r-card) - 6px); object-fit: cover; box-shadow: 0 0 0 1px var(--fx-line); }
.fx-modal-opt-name { font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); line-height: 1.25; color: var(--fx-graphite); }
.fx-modal-opt-note { font-size: var(--fx-fs-12); color: var(--fx-ink-3); }
.fx-modal-opt-tick { position: absolute; top: 2px; right: 2px; width: 1.5rem; height: 1.5rem; color: var(--fx-graphite); background: var(--fx-surface); border-radius: 50%; }
.fx-ral { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--fx-s-3); align-items: start; padding: var(--fx-s-3); border-radius: var(--fx-r-card); background: var(--fx-sunk); box-shadow: var(--fx-shadow-inset); }
.fx-ral img { width: 100%; height: 5rem; border-radius: var(--fx-r-ctl); object-fit: cover; }
.fx-ral-fields { display: grid; gap: 6px; }
.fx-ral-fields .fx-cfg-go { min-height: var(--fx-tap); margin-top: var(--fx-s-1); }
@media (max-width: 639.98px) {
    .fx-modal { place-items: end stretch; padding: 0; }
    .fx-modal-box {
        width: 100%;
        max-height: 88dvh;
        padding: var(--fx-s-5) var(--fx-s-4) calc(var(--fx-s-6) + var(--fx-safe-b));
        border-radius: var(--fx-r-sheet) var(--fx-r-sheet) 0 0;
    }
    .fx-modal-box::before { content: ''; justify-self: center; width: 2.5rem; height: 5px; margin: calc(-1 * var(--fx-s-3)) 0 calc(-1 * var(--fx-s-2)); border-radius: var(--fx-r-pill); background: var(--fx-line-2); }
    html.fx-motion .fx-modal-box { animation: fx-sales-sheet var(--fx-dur-4) var(--fx-ease-enter) backwards; }
    .fx-modal-head { margin-inline: calc(-1 * var(--fx-s-4)); padding-left: var(--fx-s-4); padding-right: var(--fx-s-3); }
    .fx-modal-grid { grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr)); gap: var(--fx-s-2); }
    .fx-ral { grid-template-columns: minmax(0, 1fr); }
}

/* The drawing to click (actuation position) */
.fx-cfg-picture-box { display: flex; align-items: center; gap: var(--fx-s-5); flex-wrap: wrap; padding: var(--fx-s-3); border-radius: var(--fx-r-card); background: var(--fx-sunk); box-shadow: var(--fx-shadow-inset); }
.fx-cfg-picture { width: min(16rem, 100%); padding: var(--fx-s-2); border-radius: var(--fx-r-ctl); background: var(--fx-surface); box-shadow: var(--fx-shadow-1); }
.fx-cfg-picture svg { display: block; width: 100%; height: auto; }
.fx-cfg-picture .schema-contur { fill: none; stroke: var(--fx-ink); stroke-width: 1.2; }
.fx-cfg-picture .schema-pos-marker circle { fill: var(--fx-surface); stroke: var(--fx-ink); stroke-width: 1.1; transition: fill var(--fx-dur-1) var(--fx-ease-out); }
.fx-cfg-picture .schema-pos-marker text { font-size: 7px; font-weight: 700; fill: var(--fx-ink); user-select: none; pointer-events: none; }
.fx-cfg-picture .schema-pos-marker-clickable { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .fx-cfg-picture .schema-pos-marker-clickable:hover circle { fill: var(--fx-sunk); stroke-width: 1.6; } }
.fx-cfg-picture .schema-pos-marker-clickable:focus-visible { outline: none; }
.fx-cfg-picture .schema-pos-marker-clickable:focus-visible circle { stroke: var(--fx-graphite); stroke-width: 2.4; }
.fx-cfg-picture .schema-pos-marker-active circle { fill: var(--fx-graphite); stroke: var(--fx-graphite); }
.fx-cfg-picture .schema-pos-marker-active text { fill: var(--fx-on-dark); }
/* A product's own picture may mark its chosen model in the factory's colour: a choice is graphite here. */
.fx-cfg-picture [style*="--fx-brand"] { stroke: var(--fx-graphite) !important; }
.fx-cfg-picture-chosen { display: grid; gap: var(--fx-s-1); justify-items: start; }
.fx-cfg-picture-chosen strong { font-size: var(--fx-fs-38); font-weight: var(--fx-fw-strong); font-stretch: var(--fx-wdth-num); line-height: 1; color: var(--fx-graphite); }
.fx-cfg-picture-chosen span { font-size: var(--fx-fs-13); color: var(--fx-ink-3); }
.fx-cfg-picture-chosen strong.is-word { font-size: var(--fx-fs-16); font-stretch: var(--fx-wdth-head); line-height: var(--fx-lh-snug); }

/* ---------- Step 3: the drawing and the price, beside the form on a computer ---------- */
.fx-cfg-side { display: grid; gap: var(--fx-gap); align-content: start; min-width: 0; }
@media (min-width: 1024px) {
    .fx-cfg-side {
        position: sticky;
        top: var(--fx-top-stack);
        max-height: calc(100dvh - var(--fx-top-stack) - var(--fx-s-2));
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        margin: -4px -12px 0;
        padding: 4px 12px var(--fx-s-4);
    }
}
.fx-cfg-panel { min-width: 0; padding: var(--fx-pad-panel); border-radius: var(--fx-r-panel); background: var(--fx-surface); box-shadow: var(--fx-shadow-1); }
.fx-cfg-drawing { display: grid; place-items: center; min-height: 12rem; background: radial-gradient(110% 90% at 50% 40%, #ffffff 50%, var(--fx-sunk) 100%), var(--fx-surface); }
.fx-cfg-drawing svg { display: block; width: 100%; height: auto; max-height: 26rem; }
@media (min-width: 1024px) {
    /* Beside the form the price comes first: it is in sight as soon as the product opens, the drawing under it. */
    .fx-cfg-side > .fx-cfg-price { order: -1; }
    .fx-cfg-drawing { min-height: 9rem; }
    .fx-cfg-drawing svg { max-height: min(24rem, 34vh); }
}

.fx-cfg-price { display: grid; gap: var(--fx-s-3); }
.fx-cfg-total { display: grid; gap: 2px; margin: calc(-1 * var(--fx-s-2)) calc(-1 * var(--fx-s-3)) 0; padding: var(--fx-s-2) var(--fx-s-3); border-radius: var(--fx-r-card); }
.fx-cfg-total > span:not(.fx-sr) { display: flex; align-items: center; gap: var(--fx-s-2); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); color: var(--fx-ink-3); }
.fx-cfg-total strong {
    font-size: var(--fx-fs-38);
    font-weight: var(--fx-fw-strong);
    font-stretch: var(--fx-wdth-num);
    letter-spacing: var(--fx-track-num);
    font-variant-numeric: tabular-nums;
    line-height: var(--fx-lh-tight);
    color: var(--fx-graphite);
    white-space: nowrap;
}
@media (min-width: 1280px) { .fx-cfg-total strong { font-size: var(--fx-fs-48); } }
.fx-cfg-busy { color: var(--fx-ink-3); }
.fx-cfg-vat { margin: 0; font-size: var(--fx-fs-13); color: var(--fx-ink-3); }
.fx-cfg-summary { margin: 0; padding-top: var(--fx-s-3); border-top: 1px solid var(--fx-line); font-size: var(--fx-fs-14); line-height: var(--fx-lh-body); color: var(--fx-ink-2); overflow-wrap: anywhere; }

/* Errors: dark words on the factory's tint, its colour in the icon and the line; warnings in amber. */
.fx-cfg-errors, .fx-cfg-warnings {
    display: grid;
    gap: var(--fx-s-2);
    margin: 0;
    padding: var(--fx-s-3) var(--fx-s-3) var(--fx-s-3) var(--fx-s-4);
    list-style: none;
    border-radius: var(--fx-r-card);
    font-size: var(--fx-fs-14);
    line-height: 1.45;
}
.fx-cfg-errors { background: var(--fx-brand-tint); box-shadow: inset 3px 0 0 var(--fx-brand); color: var(--fx-ink); }
.fx-cfg-warnings { background: var(--fx-warn-bg); box-shadow: inset 3px 0 0 var(--fx-warn-fill); color: var(--fx-warn); font-size: var(--fx-fs-13); }
.fx-cfg-errors li, .fx-cfg-warnings li { display: grid; grid-template-columns: 1.125rem minmax(0, 1fr); gap: var(--fx-s-2); align-items: start; overflow-wrap: anywhere; }
.fx-cfg-errors .fx-cfg-ico { margin-top: 1px; color: var(--fx-brand); }
.fx-cfg-warnings .fx-cfg-ico { margin-top: 1px; color: var(--fx-warn-fill); }
html.fx-motion .fx-cfg-errors, html.fx-motion .fx-cfg-warnings { animation: fx-sales-in var(--fx-dur-3) var(--fx-ease-out) backwards; }

/* How the price is made: a disclosure with a turning chevron */
.fx-cfg-breakdown { border-top: 1px solid var(--fx-line); }
.fx-cfg-breakdown summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--fx-s-2);
    min-height: var(--fx-tap);
    list-style: none;
    border-radius: var(--fx-r-ctl);
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-14);
    font-weight: var(--fx-fw-semibold);
    cursor: pointer;
}
.fx-cfg-breakdown summary::-webkit-details-marker { display: none; }
.fx-cfg-breakdown summary:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) { .fx-cfg-breakdown summary:hover { color: var(--fx-ink); } }
.fx-cfg-chev { width: 1.125rem; height: 1.125rem; flex: none; color: var(--fx-ink-3); transition: transform var(--fx-dur-3) var(--fx-ease-move); }
.fx-cfg-breakdown[open] .fx-cfg-chev { transform: rotate(180deg); }
.fx-cfg-breakdown dl { display: grid; margin: 0 0 var(--fx-s-2); }
html.fx-motion .fx-cfg-breakdown[open] dl { animation: fx-sales-in var(--fx-dur-3) var(--fx-ease-out) backwards; }
.fx-cfg-breakdown dl div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--fx-s-4); padding: 7px 0; border-top: 1px solid var(--fx-line-soft); font-size: var(--fx-fs-14); color: var(--fx-ink); }
.fx-cfg-breakdown dt small { display: block; margin-top: 1px; font-size: var(--fx-fs-12); color: var(--fx-ink-3); }
.fx-cfg-breakdown dd { margin: 0; font-weight: var(--fx-fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The save */
.fx-cfg-save { display: grid; gap: var(--fx-s-2); padding-top: var(--fx-s-4); border-top: 1px solid var(--fx-line); }
.fx-cfg-save .fx-cfg-go { width: 100%; }
.fx-cfg-hint {
    display: flex;
    align-items: center;
    gap: var(--fx-s-2);
    min-height: var(--fx-tap);
    padding: 0 var(--fx-s-3);
    border-radius: var(--fx-r-ctl);
    background: var(--fx-brand-tint);
    color: var(--fx-ink);
    font-size: var(--fx-fs-14);
    font-weight: var(--fx-fw-medium);
    text-align: left;
    cursor: pointer;
}
.fx-cfg-hint .fx-cfg-ico { color: var(--fx-brand); }
.fx-cfg-hint:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }

/* ---------- Phones and upright tablets: the total and the main action above the dock ---------- */
.fx-cfg-bar { display: none; }
@media (max-width: 1023.98px) {
    .fx-cfg-bar {
        --fx-cfg-bar-max: 480px;
        position: fixed;
        z-index: var(--fx-z-bar);
        left: 0;
        right: 0;
        bottom: calc(var(--fx-bottom-gap) + var(--fx-dock-h));
        isolation: isolate;
        display: flex;
        align-items: center;
        gap: var(--fx-s-3);
        /* exactly the dock's width when it joins the bar (fx-nav.css), so the two read as one slab */
        width: min(calc(100% - 24px - var(--fx-safe-l) - var(--fx-safe-r)), var(--fx-cfg-bar-max));
        min-height: 4rem;
        margin-inline: auto;
        padding: var(--fx-s-2) var(--fx-s-2) var(--fx-s-2) var(--fx-s-4);
        border-radius: var(--fx-r-float) var(--fx-r-float) 0 0;
        /* the slab's hairline and a soft lift above it, so its top edge shows over white panels */
        box-shadow: inset 0 -1px 0 var(--fx-line-soft), 0 0 0 1px color-mix(in oklab, var(--fx-ink) 7%, transparent),
            0 -10px 24px -14px color-mix(in oklab, var(--fx-ink) 24%, transparent);
    }
    .fx-cfg-bar::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        pointer-events: none;
        background: var(--fx-glass);
        -webkit-backdrop-filter: var(--fx-glass-filter);
        backdrop-filter: var(--fx-glass-filter);
        box-shadow: var(--fx-glass-edge);
    }
    html.fx-motion .fx-cfg-bar { animation: fx-sales-bar var(--fx-dur-4) var(--fx-ease-enter) backwards; }
    /* No dock under it (wide enough, or nothing to place in a dock): the bar floats on its own. */
    html:not(:has(.fx-dock)) .fx-cfg-bar { border-radius: var(--fx-r-float); box-shadow: var(--fx-shadow-3); }
}
@media (min-width: 640px) and (max-width: 1023.98px) { .fx-cfg-bar { --fx-cfg-bar-max: 560px; } }
.fx-cfg-bar-total {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 0;
    margin: calc(-1 * var(--fx-s-1)) 0 calc(-1 * var(--fx-s-1)) calc(-1 * var(--fx-s-2));
    padding: var(--fx-s-1) var(--fx-s-2);
    border-radius: var(--fx-r-card);
    color: inherit;
    text-decoration: none;
}
.fx-cfg-bar-total:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: 0; }
.fx-cfg-bar-label { font-size: var(--fx-fs-12); font-weight: var(--fx-fw-semibold); color: var(--fx-ink-2); }
.fx-cfg-bar-total strong {
    font-size: var(--fx-fs-24);
    font-weight: var(--fx-fw-strong);
    font-stretch: var(--fx-wdth-num);
    letter-spacing: var(--fx-track-num);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    color: var(--fx-graphite);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fx-cfg-bar-total strong.is-none { color: var(--fx-ink-2); }
.fx-cfg-bar-why { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: var(--fx-fs-12); color: var(--fx-ink-2); }
.fx-cfg-bar-why span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-cfg-bar-why .fx-cfg-ico { width: 0.875rem; height: 0.875rem; color: var(--fx-brand); }
.fx-cfg-bar-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--fx-s-2);
    flex: none;
    min-height: var(--fx-tap-lg);
    max-width: 58%;
    padding: 0 var(--fx-s-5);
    border-radius: calc(var(--fx-r-float) - var(--fx-s-2));
    background: var(--fx-brand);
    color: var(--fx-on-brand);
    box-shadow: var(--fx-shadow-brand);
    font-size: var(--fx-fs-16);
    font-weight: var(--fx-fw-semibold);
    line-height: 1.15;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color var(--fx-dur-2) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
}
.fx-cfg-bar-go:active:not(:disabled) { transform: scale(0.97); background: var(--fx-brand-press); }
.fx-cfg-bar-go:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: 2px; }
.fx-cfg-bar-go:disabled { background: var(--fx-sunk); color: var(--fx-ink-3); box-shadow: inset 0 0 0 1px var(--fx-line); cursor: not-allowed; }
.fx-cfg-bar-go.is-quiet { background: var(--fx-graphite); color: var(--fx-on-dark); box-shadow: 0 6px 14px -6px rgb(35 31 32 / 0.5); }

/* ---------- Products for sale: the picture in the list ---------- */
.fx-sale-thumb { object-fit: contain !important; border-radius: var(--fx-r-xs); background: var(--fx-surface); box-shadow: 0 0 0 1px var(--fx-line); padding: 2px; }

/* =====================================================================================================
   Simpler configurator (Nov 2026): fewer things at once, the answer next to the question.
   ===================================================================================================== */

/* ---------- The drawing: one panel, where the eye is ----------
   Phones and upright tablets: right under the sizes (is-inline). Computers: in the sticky side column under the
   price (is-side). Only one of the two is ever shown, so the roll plays once. */
.fx-cfg-drawing { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); place-items: center; gap: var(--fx-s-2); cursor: default; }
.fx-cfg-drawing-title {
    justify-self: start;
    margin: 0;
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-semibold);
    font-variant-numeric: tabular-nums;
    color: var(--fx-ink-2);
}
.fx-cfg-drawing-art { display: grid; place-items: center; width: 100%; min-width: 0; transition: opacity var(--fx-dur-3) var(--fx-ease) 140ms; }
.fx-cfg-drawing-art svg { display: block; width: 100%; height: auto; max-height: 26rem; }
.fx-cfg-drawing > .fx-cfg-muted { align-self: center; margin: 0; text-align: center; }
/* While the price is worked out the drawing dims a little (no spinner); a quick answer never flickers. */
.fx-cfg-drawing.fx-cfg-dim .fx-cfg-drawing-art { opacity: 0.45; }
/* A field still being typed: the fields typed so far, dimmed, and what is missing under them. */
.fx-cfg-drawing.is-pending .fx-cfg-drawing-art { opacity: 0.45; }
.fx-cfg-drawing-why { display: flex; align-items: center; gap: 6px; justify-self: center; margin: 0; font-size: var(--fx-fs-13); color: var(--fx-ink-2); text-align: center; }
.fx-cfg-drawing-why .fx-cfg-ico { width: 0.875rem; height: 0.875rem; flex: none; color: var(--fx-ink-3); }

@media (max-width: 1023.98px) {
    .fx-cfg-drawing.is-side { display: none; }
    .fx-cfg-drawing.is-inline { min-height: 0; }
    .fx-cfg-drawing.is-inline .fx-cfg-drawing-art svg { max-height: min(24rem, 46dvh); }
}
@media (min-width: 1024px) {
    .fx-cfg-drawing.is-inline { display: none; }
    /* Beside the form: as big as the column allows under the price, never taller than the screen. */
    .fx-cfg-drawing.is-side { min-height: 0; }
    .fx-cfg-drawing.is-side .fx-cfg-drawing-art svg { max-height: max(15rem, calc(100dvh - var(--fx-top-stack) - 28rem)); }
}

/* Beside the form the price card stays compact, so the drawing under it is in sight without scrolling. */
@media (min-width: 1024px) {
    .fx-cfg-side .fx-cfg-price { gap: var(--fx-s-2); }
    .fx-cfg-side .fx-cfg-total strong { font-size: var(--fx-fs-38); }
    .fx-cfg-side .fx-cfg-summary { padding-top: var(--fx-s-2); font-size: var(--fx-fs-13); line-height: 1.45; }
    .fx-cfg-side .fx-cfg-breakdown summary { min-height: 2.25rem; }
    .fx-cfg-side .fx-cfg-save { padding-top: var(--fx-s-3); }
}
/* Say it once: on phones and upright tablets the bar above the dock carries the total and the main button, so the
   price card under the form keeps only what the bar has no room for (VAT, the summary, warnings, how the price is
   made, the "choose the client first" hint). The total stays in the card for screen readers. */
@media (max-width: 1023.98px) {
    .fx-cfg-side .fx-cfg-price .fx-cfg-total {
        position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
        clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
    }
    .fx-cfg-side .fx-cfg-price { position: relative; }
    .fx-cfg-side .fx-cfg-price .fx-cfg-save > .fx-cfg-go { display: none; }
    .fx-cfg-side .fx-cfg-price .fx-cfg-save:not(:has(> :not(.fx-cfg-go))) { display: none; }
}
/* Phones: two short fields side by side (L and H, the colours), so the sizes and the drawing share one screen. */
@media (max-width: 639.98px) {
    .fx-cfg-fields, .fx-row .fx-cfg-fields { grid-template-columns: repeat(auto-fill, minmax(min(9rem, 100%), 1fr)); gap: var(--fx-s-3); }
}

/* Long choice names in a half-width colour field wrap instead of being cut. */
@media (max-width: 639.98px) {
    .fx-pickfield-text { white-space: normal; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.2; }
}

/* ---------- "Pentru toate câmpurile": the options below the fields table are for every field ---------- */
.fx-cfg-forall {
    display: flex;
    align-items: center;
    gap: var(--fx-s-3);
    margin: var(--fx-s-2) 0 calc(-1 * var(--fx-s-1));
    padding-inline: var(--fx-s-2);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-semibold);
    color: var(--fx-ink-2);
}
.fx-cfg-forall::after { content: ''; flex: 1; height: 1px; background: var(--fx-line-2); }

/* ---------- The fields of a line, one row each: only L and H in sight ---------- */
.fx-ft { --fx-ft-cols: 2rem minmax(0, 1fr) minmax(0, 1fr); display: grid; gap: var(--fx-s-2); max-width: 34rem; }
.fx-ft-head, .fx-ft-row { display: grid; grid-template-columns: var(--fx-ft-cols); gap: var(--fx-s-2) var(--fx-s-3); align-items: center; }
.fx-ft-head { font-size: var(--fx-fs-12); font-weight: var(--fx-fw-semibold); color: var(--fx-ink-3); }
.fx-ft-head small { font-size: inherit; font-weight: var(--fx-fw-regular); }
.fx-ft-rest { display: grid; gap: var(--fx-s-2); }
.fx-ft-no {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--fx-r-pill);
    background: var(--fx-sunk);
    box-shadow: var(--fx-shadow-inset);
    color: var(--fx-ink);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-bold);
    font-stretch: var(--fx-wdth-num);
    font-variant-numeric: tabular-nums;
}
.fx-ft .fx-cfg-help { margin: 0; }
html.fx-motion .fx-ft-rest > .fx-ft-row { animation: fx-sales-in var(--fx-dur-3) var(--fx-ease-out) backwards; }

/* "Altfel decât câmpul 1": what a field does differently, folded under its sizes. */
.fx-ft-diff { grid-column: 2 / -1; min-width: 0; margin-top: calc(-1 * var(--fx-s-1)); }
.fx-ft-diff > summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 2rem;
    padding: 0 var(--fx-s-1);
    margin-left: calc(-1 * var(--fx-s-1));
    list-style: none;
    border-radius: var(--fx-r-xs);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-semibold);
    color: var(--fx-ink-2);
    cursor: pointer;
}
.fx-ft-diff > summary::-webkit-details-marker { display: none; }
.fx-ft-diff > summary:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
.fx-ft-diff > summary .fx-cfg-chev { width: 1rem; height: 1rem; }
.fx-ft-diff[open] > summary .fx-cfg-chev { transform: rotate(180deg); }
@media (pointer: coarse) { .fx-ft-diff > summary { min-height: var(--fx-tap); } }
@media (hover: hover) and (pointer: fine) { .fx-ft-diff > summary:hover { color: var(--fx-ink); } }
.fx-ft-cells {
    display: grid;
    gap: var(--fx-s-3);
    grid-template-columns: repeat(auto-fill, minmax(min(10.5rem, 100%), 1fr));
    margin: var(--fx-s-1) 0 var(--fx-s-2);
    padding: var(--fx-s-3);
    border-radius: var(--fx-r-card);
    background: var(--fx-sunk);
    box-shadow: var(--fx-shadow-inset);
}
html.fx-motion .fx-ft-diff[open] .fx-ft-cells { animation: fx-sales-in var(--fx-dur-3) var(--fx-ease-out) backwards; }
@media (max-width: 639.98px) {
    .fx-ft { --fx-ft-cols: 1.75rem minmax(0, 1fr) minmax(0, 1fr); max-width: none; }
    .fx-ft-diff { grid-column: 1 / -1; }
}

/* ---------- "Mai multe opțiuni": the rare things, one tap away ---------- */
.fx-row.fx-cfg-more { display: block; padding-block: var(--fx-s-2); }
.fx-cfg-more-head {
    display: flex;
    align-items: center;
    gap: var(--fx-s-3);
    min-height: var(--fx-tap);
    list-style: none;
    border-radius: var(--fx-r-ctl);
    cursor: pointer;
}
.fx-cfg-more-head::-webkit-details-marker { display: none; }
.fx-cfg-more-head:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
.fx-cfg-more-head .fx-row-label { flex: none; padding-top: 0; }
.fx-cfg-more-set { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fx-fs-13); color: var(--fx-ink-2); }
.fx-cfg-more[open] .fx-cfg-more-set { visibility: hidden; }
.fx-cfg-more[open] > .fx-cfg-more-head .fx-cfg-chev { transform: rotate(180deg); }
.fx-cfg-more > .fx-row-body { padding: var(--fx-s-3) 0 var(--fx-s-2); }
html.fx-motion .fx-cfg-more[open] > .fx-row-body { animation: fx-sales-in var(--fx-dur-3) var(--fx-ease-out) backwards; }

/* ---------- Help is an "i", not a paragraph ---------- */
.fx-cfg-info { margin-top: 4px; }
.fx-cfg-info > summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 1.75rem;
    list-style: none;
    border-radius: var(--fx-r-xs);
    font-size: var(--fx-fs-13);
    color: var(--fx-ink-3);
    cursor: pointer;
}
.fx-cfg-info > summary::-webkit-details-marker { display: none; }
.fx-cfg-info > summary .fx-cfg-ico { width: 1rem; height: 1rem; }
.fx-cfg-info > summary:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) { .fx-cfg-info > summary:hover { color: var(--fx-ink-2); } }
@media (pointer: coarse) { .fx-cfg-info > summary { min-height: var(--fx-tap); } }
.fx-cfg-info[open] > summary { color: var(--fx-ink-2); }
.fx-cfg-info > .fx-cfg-help { max-width: 36rem; margin-top: 2px; }

/* ---------- "+ Client nou" when the search finds nobody ---------- */
.fx-cfg-match-new {
    display: flex;
    align-items: center;
    gap: var(--fx-s-2);
    width: 100%;
    min-height: var(--fx-tap);
    padding: var(--fx-s-2) var(--fx-s-3);
    border-radius: calc(var(--fx-r-card) - 4px);
    color: var(--fx-ink);
    font-weight: var(--fx-fw-semibold);
    text-decoration: none;
}
.fx-cfg-match-new .fx-cfg-ico { color: var(--fx-ink-3); }
.fx-cfg-match-new:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .fx-cfg-match-new:hover { background: var(--fx-hover); } }

/* ---------- An offer line with several fields: each field on its own line ---------- */
.fx-offer-summary > span { display: block; }
.fx-offer-summary > .fx-offer-summary-field { padding-left: var(--fx-s-2); border-left: 2px solid var(--fx-line-2); font-variant-numeric: tabular-nums; }
.fx-offer-summary > .fx-offer-summary-field:nth-child(2) { margin-top: 2px; }

/* =====================================================================================================
   Calmer offer screens (18 Nov 2026): the siblings of the order screens (fx-orders.css).
   Each screen shows what this person acts on, one coloured button, the rest one tap away.
   This file loads before fx-orders.css and fx-calm.css, so rules that meet theirs carry the page's class.
   ===================================================================================================== */

/* ---------- An offer's positions: one compact row each (offer page and the configurator's step 4) ---------- */
.fx-offer-lines { padding: 0; overflow: hidden; }
.fx-offer-list { display: grid; margin: 0; padding: 0; list-style: none; }
.fx-offer-line {
    position: relative;
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr) auto;
    grid-template-areas: "thumb main money" "more more more";
    column-gap: var(--fx-s-3);
    grid-template-rows: minmax(59px, auto) auto;
    align-items: center;
    padding: 0 var(--fx-pad-panel);
    border-top: 1px solid var(--fx-line);
    transition: opacity var(--fx-dur-3) var(--fx-ease-exit), transform var(--fx-dur-3) var(--fx-ease-exit), background-color var(--fx-dur-2) var(--fx-ease-out);
}
.fx-offer-line.has-acts { grid-template-columns: 3.25rem minmax(0, 1fr) auto auto; grid-template-areas: "thumb main money acts" "more more more more"; }
.fx-offer-line:first-child { border-top: 0; }
@media (hover: hover) and (pointer: fine) { .fx-offer-line:hover { background-color: var(--fx-hover); } }
.fx-offer-thumb {
    grid-area: thumb;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 2.75rem;
    padding: 3px;
    border-radius: var(--fx-r-xs);
    background: var(--fx-surface);
    box-shadow: inset 0 0 0 1px var(--fx-line);
    overflow: hidden;
}
.fx-offer-thumb svg { display: block; width: 100%; height: 100%; }
.fx-offer-thumb.is-empty svg { width: 1.375rem; height: 1.375rem; color: var(--fx-ink-disabled); }
/* The row is the button that opens the rest; it covers the whole row except the two small buttons. */
.fx-offer-main { grid-area: main; display: grid; gap: 1px; min-width: 0; padding: var(--fx-s-2) 0; text-align: left; color: inherit; cursor: pointer; }
.fx-offer-main::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 60px; }
.fx-offer-main:focus-visible { outline: none; }
.fx-offer-main:focus-visible .fx-offer-name { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: 3px; border-radius: var(--fx-r-xs); }
.fx-offer-head { display: flex; align-items: center; gap: var(--fx-s-2); min-width: 0; }
.fx-offer-seq { flex: none; min-width: 1.125rem; color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); font-variant-numeric: tabular-nums; }
.fx-offer-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fx-fs-14); font-weight: var(--fx-fw-semibold); line-height: var(--fx-lh-snug); color: var(--fx-ink); }
.fx-offer-what { display: block; padding-left: calc(1.125rem + var(--fx-s-2)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fx-fs-13); line-height: 1.4; color: var(--fx-ink-3); }
.fx-offer-flag { display: inline-flex; flex: none; color: var(--fx-warn-fill); }
.fx-offer-flag .fx-cfg-ico { width: 1rem; height: 1rem; }
.fx-offer-money { grid-area: money; display: grid; justify-items: end; gap: 0; text-align: right; }
.fx-offer-money strong { font-size: var(--fx-fs-14); font-weight: var(--fx-fw-semibold); letter-spacing: var(--fx-track-num); font-variant-numeric: tabular-nums; color: var(--fx-ink); white-space: nowrap; }
.fx-offer-money small { font-size: var(--fx-fs-12); color: var(--fx-ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-offer-actions { grid-area: acts; position: relative; z-index: 1; display: flex; align-items: center; gap: 2px; margin-right: calc(-1 * var(--fx-s-2)); }
.fx-offer-act {
    display: inline-grid;
    place-items: center;
    width: 2.375rem;
    height: 2.375rem;
    border-radius: var(--fx-r-ctl);
    color: var(--fx-ink-3);
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color var(--fx-dur-1) var(--fx-ease-out), color var(--fx-dur-1) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
}
.fx-offer-act:active { transform: scale(0.94); }
.fx-offer-act:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
    .fx-offer-act:hover { background: var(--fx-canvas-deep); color: var(--fx-ink); }
    .fx-offer-act.is-remove:hover { color: var(--fx-bad); }
}
@media (pointer: coarse) { .fx-offer-act { width: var(--fx-tap); height: var(--fx-tap); } }

/* Opened by a tap on the row: the whole description, the warning, how the price is made. */
.fx-offer-more { grid-area: more; display: grid; gap: var(--fx-s-2); min-width: 0; padding: 0 0 var(--fx-s-4) calc(3.25rem + var(--fx-s-3) + 1.125rem + var(--fx-s-2)); }
html.fx-motion .fx-offer-more { animation: fx-sales-in var(--fx-dur-3) var(--fx-ease-out); }
.fx-offer-line.is-fx-sales-open .fx-offer-what { display: none; }
.fx-offer-summary { margin: 0; font-size: var(--fx-fs-13); line-height: var(--fx-lh-body); color: var(--fx-ink-2); overflow-wrap: anywhere; }
.fx-offer-facts { display: flex; flex-wrap: wrap; gap: 2px var(--fx-s-3); margin: 0; font-size: var(--fx-fs-13); color: var(--fx-ink-3); }
.fx-offer-warn {
    display: grid;
    grid-template-columns: 1.125rem minmax(0, 1fr);
    gap: var(--fx-s-2);
    margin: 0;
    padding: var(--fx-s-2) var(--fx-s-3);
    border-radius: var(--fx-r-ctl);
    background: var(--fx-warn-bg);
    color: var(--fx-warn);
    font-size: var(--fx-fs-13);
    line-height: 1.45;
}
.fx-offer-warn .fx-cfg-ico { margin-top: 1px; color: var(--fx-warn-fill); }
.fx-offer-makeup { display: grid; gap: 2px; max-width: 30rem; margin: 0; font-size: var(--fx-fs-13); color: var(--fx-ink-2); }
.fx-offer-makeup > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--fx-s-4); }
.fx-offer-makeup dt small { margin-left: var(--fx-s-2); color: var(--fx-ink-3); }
.fx-offer-makeup dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-offer-makeup-head { padding-top: var(--fx-s-2); border-top: 1px solid var(--fx-line); color: var(--fx-ink-3); }

/* Being removed: it fades aside while the server works; then the others glide up. */
.fx-offer-line.fx-offer-leaving { opacity: 0.35; transform: translateX(14px); pointer-events: none; }

/* Just added (or changed): marked once, a soft green that fades when it is first seen. */
.fx-offer-new {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    padding: 1px var(--fx-s-2) 1px 6px;
    border-radius: var(--fx-r-pill);
    background: var(--fx-ok-bg);
    color: var(--fx-ok);
    font-size: var(--fx-fs-12);
    font-weight: var(--fx-fw-semibold);
}
.fx-offer-new .fx-cfg-ico { width: 0.875rem; height: 0.875rem; color: var(--fx-ok-fill); }
.fx-offer-fresh { isolation: isolate; }
.fx-offer-fresh::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--fx-ok-bg); opacity: 0; }
html.fx-motion .fx-offer-fresh.is-fx-sales-seen::before { animation: fx-sales-fresh 2.4s var(--fx-ease-in-out) both; }
html.fx-motion .fx-offer-fresh.is-fx-sales-seen .fx-offer-new { animation: fx-sales-done var(--fx-dur-4) var(--fx-ease-spring) backwards; }

/* The total under the positions (the configurator's step 4; the offer page has its own column). */
.fx-offer-adjust { display: grid; gap: 2px; margin: 0; padding: var(--fx-s-3) var(--fx-pad-panel) 0; border-top: 1px solid var(--fx-line); font-size: var(--fx-fs-13); color: var(--fx-ink-2); }
.fx-offer-adjust > div { display: flex; justify-content: space-between; gap: var(--fx-s-4); }
.fx-offer-adjust dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-offer-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--fx-s-4);
    margin: 0;
    padding: var(--fx-s-3) var(--fx-pad-panel);
    border-top: 1px solid var(--fx-line);
}
.fx-offer-adjust + .fx-offer-total { border-top: 0; padding-top: var(--fx-s-1); }
.fx-offer-total span { font-size: var(--fx-fs-14); font-weight: var(--fx-fw-medium); color: var(--fx-ink-2); }
.fx-offer-total strong { font-size: var(--fx-fs-20); font-weight: var(--fx-fw-strong); letter-spacing: var(--fx-track-num); font-variant-numeric: tabular-nums; color: var(--fx-ink); white-space: nowrap; }

/* An offer with no positions yet. */
.fx-offer-empty { display: grid; justify-items: center; gap: var(--fx-s-3); padding: var(--fx-s-7) var(--fx-pad-panel); text-align: center; }
.fx-offer-empty p { margin: 0; max-width: 28rem; color: var(--fx-ink-2); font-size: var(--fx-fs-14); }
.fx-offer-empty-ico { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--fx-sunk); box-shadow: inset 0 0 0 1px var(--fx-line); color: var(--fx-ink-3); }
.fx-offer-empty-ico svg { width: 1.375rem; height: 1.375rem; }

@media (max-width: 639.98px) {
    .fx-offer-line, .fx-offer-line.has-acts { grid-template-columns: 2.75rem minmax(0, 1fr) auto; grid-template-areas: "thumb main money" "more more more"; column-gap: var(--fx-s-3); padding-inline: var(--fx-s-3); }
    .fx-offer-thumb { width: 2.75rem; height: 2.5rem; }
    /* the two small buttons wait inside the opened row, where a thumb reaches them */
    .fx-offer-line.has-acts .fx-offer-actions { display: none; grid-area: auto; }
    .fx-offer-line.has-acts.is-fx-sales-open { grid-template-areas: "thumb main money" "more more more" "acts acts acts"; }
    .fx-offer-line.has-acts.is-fx-sales-open .fx-offer-actions { display: flex; grid-area: acts; justify-content: flex-end; gap: var(--fx-s-2); margin: 0; padding-bottom: var(--fx-s-2); }
    .fx-offer-more { padding-left: 0; padding-bottom: var(--fx-s-3); }
    .fx-offer-line.has-acts.is-fx-sales-open .fx-offer-more { padding-bottom: var(--fx-s-1); }
}

/* ---------- The offer page: the head ---------- */
/* Title, one grey line (the offer's name, validity, agent), the stage, then "Ce urmează" with the page's one
   coloured button on the same row: the same build as the order page. */
.fx-offer-page .fi-header { align-items: flex-end; gap: var(--fx-s-3); }
.fx-offer-page .fi-header > :first-child { flex: 1; min-width: 0; }
.fx-offer-page .fi-header-subheading { display: block; max-width: none; margin-top: 2px; }
.fx-offer-page .fx-journey-wrap { margin-top: 0; }
.fx-offer-page .fx-journey-step { min-height: 22px; font-size: var(--fx-fs-12); }
.fx-offer-page .fx-journey-step + .fx-journey-step::before { content: ''; width: 10px; height: 1px; margin-right: var(--fx-s-1); margin-left: calc(var(--fx-s-2) * -1 - 2px); background: var(--fx-line-2); }
.fx-offer-page :is(.fx-pill, .fx-journey-cancelled) { min-height: 22px; font-size: var(--fx-fs-12); }
.fx-pill-wait { background: var(--fx-st-work-bg); color: var(--fx-st-work-text); }
.fx-pill-late { background: var(--fx-st-cancel-bg); color: var(--fx-st-cancel-text); }
.fx-offer-page .fi-header-actions-ctn { flex: none; align-self: flex-end; min-height: 40px; align-items: center; }
.fx-offer-page .fi-header-actions-ctn .fi-btn:disabled,
.fx-offer-page .fi-header-actions-ctn .fi-btn[aria-disabled="true"] { opacity: 0.5; box-shadow: none; cursor: not-allowed; }
@media (max-width: 639.98px) {
    .fx-offer-page .fi-header { position: relative; flex-direction: column; align-items: stretch; }
    .fx-offer-page .fi-header-actions-ctn .fi-ac { width: 100%; }
    .fx-offer-page .fi-btn.fx-next-main { flex: 1; min-height: var(--fx-tap-main); }
    /* no main button now: the "⋯" sits beside the title */
    .fx-offer-quiet .fi-header-actions-ctn { position: absolute; top: 0; right: 0; min-height: 0; }
    .fx-offer-quiet .fi-header-heading, .fx-offer-quiet .fi-breadcrumbs { padding-right: var(--fx-s-8); }
}

/* ---------- The offer page: the positions beside a quiet column ---------- */
.fx-offer-view { display: grid; gap: var(--fx-gap); align-items: start; }
@media (min-width: 1024px) { .fx-offer-view { grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr); } }
.fx-offer-main-col { display: grid; gap: var(--fx-s-2); min-width: 0; }
.fx-offer-col-title { display: flex; align-items: center; gap: var(--fx-s-2); margin: 0; padding-inline: var(--fx-s-1); font-size: var(--fx-fs-14); font-weight: var(--fx-fw-semibold); color: var(--fx-ink-2); }
.fx-offer-col-title .fx-step-count { min-width: 1.5rem; height: 1.25rem; font-size: var(--fx-fs-12); box-shadow: none; background: var(--fx-canvas-deep); }
.fx-offer-side { display: grid; gap: var(--fx-gap); align-content: start; min-width: 0; }
@media (min-width: 1024px) { .fx-offer-side { margin-top: calc(1.3125rem + var(--fx-s-2)); } }
.fx-offer-side > .fx-cfg-panel { display: grid; gap: var(--fx-s-3); padding: var(--fx-s-4) var(--fx-pad-panel); }
.fx-offer-facts-list { display: grid; gap: var(--fx-s-2); margin: 0; }
.fx-offer-facts-list > div { display: grid; grid-template-columns: minmax(5.5rem, 40%) minmax(0, 1fr); align-items: baseline; column-gap: var(--fx-s-3); }
.fx-offer-facts-list dt { color: var(--fx-ink-3); font-size: var(--fx-fs-13); }
.fx-offer-facts-list dd { margin: 0; min-width: 0; text-align: right; font-size: var(--fx-fs-14); color: var(--fx-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fx-offer-facts-list a { color: var(--fx-ink); text-decoration: underline; text-decoration-color: var(--fx-line-2); text-underline-offset: 3px; border-radius: var(--fx-r-xs); }
.fx-offer-facts-list a:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
.fx-offer-sum .fx-offer-facts-list { padding-bottom: var(--fx-s-3); border-bottom: 1px solid var(--fx-line); }
.fx-offer-sum-total { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: var(--fx-s-3); border-radius: var(--fx-r-xs); }
.fx-offer-sum-label { font-size: var(--fx-fs-13); color: var(--fx-ink-3); }
.fx-offer-sum-total strong { font-size: var(--fx-fs-24); font-weight: var(--fx-fw-strong); letter-spacing: var(--fx-track-num); font-variant-numeric: tabular-nums; line-height: var(--fx-lh-snug); color: var(--fx-ink); white-space: nowrap; }
.fx-offer-sum-total small { grid-column: 1 / -1; justify-self: end; font-size: var(--fx-fs-12); color: var(--fx-ink-3); }

/* The discount approval and the cancel reason: a quiet note in the details. */
.fx-offer-note { display: grid; grid-template-columns: 1.125rem minmax(0, 1fr); gap: var(--fx-s-2); padding: var(--fx-s-3); border-radius: var(--fx-r-ctl); font-size: var(--fx-fs-13); line-height: 1.45; }
.fx-offer-note > div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.fx-offer-note b { font-weight: var(--fx-fw-semibold); }
.fx-offer-note-ico { width: 1.125rem; height: 1.125rem; margin-top: 1px; }
.fx-offer-note.is-warn { background: var(--fx-warn-bg); color: var(--fx-warn); }
.fx-offer-note.is-warn .fx-offer-note-ico { color: var(--fx-warn-fill); }
.fx-offer-note.is-ok { background: var(--fx-ok-bg); color: var(--fx-ok); }
.fx-offer-note.is-ok .fx-offer-note-ico { color: var(--fx-ok-fill); }
.fx-offer-note.is-bad { background: var(--fx-bad-bg); color: var(--fx-bad); }
.fx-offer-note.is-bad .fx-offer-note-ico { color: var(--fx-bad-fill); }
.fx-offer-note.is-quiet { background: var(--fx-sunk); color: var(--fx-ink-2); box-shadow: inset 0 0 0 1px var(--fx-line); }
.fx-offer-note.is-quiet .fx-offer-note-ico { color: var(--fx-ink-3); }
.fx-offer-note-wait { font-weight: var(--fx-fw-semibold); }

/* ---------- Oferte: one line per offer (the row look is fx-list-tight, fx-orders.css) ---------- */
.fx-due { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-due.is-fine { color: var(--fx-ink-3); }
.fx-due.is-soon { color: var(--fx-st-work-text); font-weight: var(--fx-fw-semibold); }
.fx-due.is-late { color: var(--fx-st-cancel-text); }
.fx-offers-page .fi-ta-cell-creator\.name .fi-ta-text-item { color: var(--fx-ink-2); }
.fx-offers-page .fi-ta-cell-status .fi-ta-text { flex-wrap: nowrap; }
@media (min-width: 640px) {
    .fx-offers-page.fx-list-tight .fi-ta-cell-customer\.name { width: 38%; }
    .fx-offers-page.fx-list-tight :is(.fi-ta-cell-number, .fi-ta-cell-status, .fi-ta-cell-valid-until, .fi-ta-cell-total-cents) { width: 1%; white-space: nowrap; }
}
/* the search box sits right after the short title "Oferte" */
@media (min-width: 1024px) { .fx-offers-page.fx-list-tight .fi-ta-header-toolbar { left: 7.25rem; } }

/* =====================================================================================================
   Calmer configurator (18 Nov 2026): only the current step is open; a finished step is one line.
   ===================================================================================================== */

/* ---------- A step as one row: its number and name, then what it holds ---------- */
.fx-step-row { display: flex; align-items: center; gap: var(--fx-s-2) var(--fx-s-4); flex-wrap: wrap; min-width: 0; }
.fx-step.fx-step-row { padding-block: var(--fx-s-3); }
.fx-step-row > .fx-step-title { flex: none; }
.fx-step-row.is-done > .fx-step-title { color: var(--fx-ink-3); font-weight: var(--fx-fw-medium); }
.fx-step-line { flex: 1 1 14rem; display: flex; align-items: center; gap: var(--fx-s-1) var(--fx-s-3); flex-wrap: wrap; min-width: 0; min-height: 2.5rem; }
.fx-step-line > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fx-fs-16); font-weight: var(--fx-fw-semibold); color: var(--fx-ink); }
.fx-step-line-more { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fx-fs-14); color: var(--fx-ink-3); font-variant-numeric: tabular-nums; }
.fx-step-line-more strong { margin-left: var(--fx-s-1); color: var(--fx-ink); font-weight: var(--fx-fw-semibold); }
.fx-step-line-more[data-fx-pulse] { border-radius: var(--fx-r-xs); }
.fx-step-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: none;
    min-height: 2.25rem;
    padding: 0 var(--fx-s-2);
    margin-inline: calc(-1 * var(--fx-s-2));
    border-radius: var(--fx-r-ctl);
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-14);
    font-weight: var(--fx-fw-medium);
    text-decoration: underline;
    text-decoration-color: var(--fx-line-2);
    text-underline-offset: 3px;
    cursor: pointer;
    touch-action: manipulation;
}
.fx-step-link:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .fx-step-link:hover { color: var(--fx-ink); background: var(--fx-hover); } }
@media (pointer: coarse) { .fx-step-link { min-height: var(--fx-tap); } }
.fx-step-link[aria-expanded="true"] .fx-cfg-chev { transform: rotate(180deg); }
.fx-step-go { margin-left: auto; }
/* The offer's optional name: a quiet box at the end of the client's row */
.fx-step-name { flex: 1 1 12rem; display: grid; gap: 2px; min-width: 0; max-width: 22rem; margin-left: auto; }
.fx-step-name .fx-cfg-input { min-height: 2.5rem; font-size: var(--fx-fs-14); }
.fx-cfg-input.is-bad { border-color: var(--fx-bad-fill); }
.fx-cfg-field-error { font-size: var(--fx-fs-13); color: var(--fx-bad); }
/* Open: the search, the name, and the clients of his latest offers under them */
.fx-step-open { flex: 1 1 20rem; display: flex; align-items: flex-start; gap: var(--fx-s-2) var(--fx-s-3); flex-wrap: wrap; min-width: 0; }
.fx-step-open > .fx-cfg-search { flex: 2 1 16rem; min-width: 0; }
.fx-step-open .fx-cfg-input { min-height: 2.5rem; }
.fx-step-recent { flex: 1 1 100%; display: flex; align-items: center; gap: var(--fx-s-2); min-width: 0; overflow: hidden; }
.fx-step-recent .fx-pick-chip { flex: 0 1 auto; display: block; min-width: 5rem; line-height: 2.25rem; }
@media (pointer: coarse) { .fx-step-recent .fx-pick-chip { line-height: var(--fx-tap); } }
.fx-step-recent-label { font-size: var(--fx-fs-13); color: var(--fx-ink-3); }
/* Step 4 folded: the row, and the positions under it once asked for */
.fx-step.fx-step-lines { gap: 0; padding-block: var(--fx-s-3); }
.fx-step-lines > #step-lines-list { margin-top: var(--fx-s-3); }
.fx-step-lines .fx-offer-lines { box-shadow: inset 0 0 0 1px var(--fx-line); border-radius: var(--fx-r-card); }
html.fx-motion .fx-step-lines > #step-lines-list { animation: fx-sales-in var(--fx-dur-3) var(--fx-ease-out); }

/* Once a product is open, steps 1 and 2 sit side by side on a computer. */
@media (min-width: 1024px) {
    .fx-cfg.has-product { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fx-cfg.has-product > .fx-step:not(:nth-child(-n + 2)) { grid-column: 1 / -1; }
}
@media (max-width: 639.98px) {
    .fx-step { gap: var(--fx-s-3); }
    .fx-step-title { font-size: var(--fx-fs-16); gap: 10px; }
    .fx-step-no { width: 1.5rem; height: 1.5rem; font-size: var(--fx-fs-12); }
    .fx-step-row { gap: var(--fx-s-1) var(--fx-s-3); }
    .fx-step-name { flex-basis: 100%; max-width: none; }
    .fx-step-name .fx-cfg-input, .fx-step-open .fx-cfg-input { min-height: var(--fx-tap); font-size: var(--fx-fs-16); }
    .fx-step-open > .fx-cfg-search { flex-basis: 100%; }
    /* the clients of his latest offers in one row that slides sideways, each name whole */
    .fx-step-recent { overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--fx-pad-panel)); padding-inline: var(--fx-pad-panel); }
    .fx-step-recent::-webkit-scrollbar { display: none; }
    .fx-step-recent .fx-pick-chip { flex: none; max-width: 16rem; }
    .fx-step-go { margin-left: 0; }
    /* a folded step stays short: the family of the product and the client's CUI are left out */
    .fx-step-row.is-done .fx-step-line > .fx-step-line-more:not([data-fx-pulse]) { display: none; }
    .fx-step-lines .fx-step-line { flex-basis: 100%; }
}

/* ---------- Step 2 chosen: the product in one line; its picture flies here from the card that was pressed ---------- */
.fx-pick-chosen-img {
    display: block;
    flex: none;
    width: 3rem;
    height: 2.5rem;
    overflow: hidden;
    border-radius: var(--fx-r-xs);
    background: var(--fx-surface);
    box-shadow: inset 0 0 0 1px var(--fx-line);
}
.fx-pick-chosen-img img { display: block; width: 100%; height: 100%; padding: 6%; object-fit: contain; }
.fx-pick-chosen-img.is-fx-sales-landing { opacity: 0; }
.fx-pick-ghost { position: fixed; z-index: var(--fx-z-bar); margin: 0; transform-origin: 0 0; pointer-events: none; box-shadow: var(--fx-shadow-3); }

/* ---------- Step 2 open: every product on one screen ---------- */
.fx-pick { display: grid; gap: var(--fx-s-3); min-width: 0; container-type: inline-size; }
.fx-pick-bar { display: flex; align-items: center; gap: var(--fx-s-2) var(--fx-s-3); flex-wrap: wrap; min-width: 0; }
.fx-pick-search { flex: 0 1 11rem; min-width: 9rem; }
.fx-pick-search .fx-cfg-input { min-height: 2.5rem; font-size: var(--fx-fs-14); }
.fx-pick-chips { flex: 1 1 20rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.fx-pick-chips .fx-pick-chip { padding: 0 10px; font-size: var(--fx-fs-13); }
.fx-pick-chip {
    display: inline-flex;
    align-items: center;
    flex: none;
    max-width: 100%;
    min-height: 2.25rem;
    padding: 0 var(--fx-s-3);
    border-radius: var(--fx-r-pill);
    background: var(--fx-surface);
    box-shadow: inset 0 0 0 1px var(--fx-line-2);
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-14);
    font-weight: var(--fx-fw-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color var(--fx-dur-2) var(--fx-ease-out), color var(--fx-dur-2) var(--fx-ease-out), box-shadow var(--fx-dur-2) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
}
.fx-pick-chip:active { transform: scale(0.97); }
.fx-pick-chip.is-on { background: var(--fx-graphite); box-shadow: none; color: var(--fx-on-dark); }
.fx-pick-chip:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .fx-pick-chip:not(.is-on):hover { background: var(--fx-hover); color: var(--fx-ink); box-shadow: inset 0 0 0 1px var(--fx-ink-3); } }
@media (pointer: coarse) { .fx-pick-chip { min-height: var(--fx-tap); } }
.fx-pick-set { display: grid; gap: var(--fx-s-2); min-width: 0; }
.fx-pick-sub { margin: 0; font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); color: var(--fx-ink-3); }
/* under "Folosite des", every product starts after a thin line (no second heading) */
.fx-pick-all.has-often:not(.is-fx-sales-filtered) { padding-top: var(--fx-s-3); border-top: 1px solid var(--fx-line); }
.fx-pick-chip.is-clear { gap: 2px; padding-left: var(--fx-s-2); color: var(--fx-ink-3); box-shadow: none; }
.fx-pick-chip.is-clear .fx-cfg-ico { width: 1rem; height: 1rem; }
/* Small equal cards: eight to a row on a computer, fewer as the panel narrows, three on a phone. */
.fx-pick-cards { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--fx-s-2) var(--fx-s-3); }
@container (max-width: 62rem) { .fx-pick-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@container (max-width: 44rem) { .fx-pick-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (max-width: 30rem) { .fx-pick-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--fx-s-2); } }
.fx-pick-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 5px 5px 0;
    border-radius: var(--fx-r-card);
    background: var(--fx-surface);
    box-shadow: inset 0 0 0 1px var(--fx-line);
    color: var(--fx-ink);
    text-align: center;
    transition: box-shadow var(--fx-dur-2) var(--fx-ease-out), transform var(--fx-dur-1) var(--fx-ease-out);
}
button.fx-pick-card { cursor: pointer; }
.fx-pick-img {
    position: relative;
    display: block;
    height: 64px;
    overflow: hidden;
    border-radius: calc(var(--fx-r-card) - 5px);
    background: var(--fx-sunk);
}
.fx-pick-img img { display: block; width: 100%; height: 100%; padding: 5px; object-fit: contain; transition: transform var(--fx-dur-4) var(--fx-ease-out); }
.fx-pick-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    box-sizing: content-box;
    height: calc(2 * 1.25em);
    margin: 5px 2px;
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-semibold);
    line-height: 1.25;
    color: var(--fx-ink);
    overflow-wrap: anywhere;
}
button.fx-pick-card:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
    button.fx-pick-card:hover { box-shadow: inset 0 0 0 1px var(--fx-ink-3), 0 10px 20px -14px rgb(23 24 28 / 0.35); transform: translateY(-2px); }
    button.fx-pick-card:hover .fx-pick-img img { transform: scale(1.06); }
}
/* While the chosen product is fetched: a quiet veil with a spinner (after 200ms). */
.fx-pick-wait { position: absolute; inset: 0; place-items: center; background: rgb(255 255 255 / 0.6); color: var(--fx-graphite); font-size: 1.25rem; }
.fx-pick-card.is-coming { background: var(--fx-sunk); cursor: default; }
.fx-pick-card.is-coming .fx-pick-img img { filter: grayscale(1); opacity: 0.45; }
.fx-pick-card.is-coming .fx-pick-name { color: var(--fx-ink-3); }
.fx-pick-soon { position: absolute; top: var(--fx-s-2); left: var(--fx-s-2); padding: 1px var(--fx-s-2); border-radius: var(--fx-r-pill); background: var(--fx-graphite); color: var(--fx-on-dark); font-size: var(--fx-fs-12); font-weight: var(--fx-fw-semibold); }
@media (max-width: 639.98px) {
    .fx-pick-search { flex: 1 1 100%; }
    .fx-pick-search .fx-cfg-input { min-height: var(--fx-tap); font-size: var(--fx-fs-16); }
    /* the families in one row that slides sideways, not three rows above the cards */
    .fx-pick-chips { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--fx-pad-panel)); padding-inline: var(--fx-pad-panel); }
    .fx-pick-chips::-webkit-scrollbar { display: none; }
    .fx-pick-img { height: 60px; }
    .fx-pick-chips .fx-pick-chip { font-size: var(--fx-fs-14); padding: 0 var(--fx-s-3); }
}
