/* PMTC/ZDSK configurator UI. Shared structure for any product configurator. */

.xs-configurator {
    margin: 24px 0 32px;
    padding: 24px;
    border: 1px solid #e1e6ed;
    border-radius: 12px;
    background: #fbfcfd;
}

.xs-configurator-header {
    margin-bottom: 20px;
}

.xs-configurator-title {
    margin: 0 0 4px;
    font-size: 20px;
    color: #0d1c2c;
}

.xs-configurator-subtitle {
    margin: 0;
    font-size: 14px;
    color: #54637a;
}

/* Wrapper that breaks the configurator out of the right product column. */
.xs-configurator-row {
    margin: 24px 0 32px;
}

.xs-configurator-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
}

/* Steps column (now full width). On wide viewports use a 2-column grid so the
   long list of option groups doesn't scroll forever. */
.xs-configurator-steps {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

@media (min-width: 900px) {
    .xs-configurator-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    /* Keep the two slider steps (capacity + span) on one row for clarity, then
       options flow naturally in 2 columns below. */
    .xs-cfg-step--axis {
        grid-column: span 1;
    }
}

.xs-cfg-step {
    border: 1px solid #d6dde5;
    border-radius: 10px;
    padding: 16px 18px 18px;
    background: #fff;
    margin: 0;
}

.xs-cfg-step legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #0d1c2c;
    font-size: 15px;
    padding: 0 8px;
}

.xs-cfg-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #b91c1c;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
}

.xs-cfg-step-value {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    color: #b91c1c;
}

.xs-cfg-step-unit {
    color: #54637a;
    font-weight: 500;
    font-size: 13px;
}

.xs-cfg-step-help {
    margin: 0 0 12px;
    color: #54637a;
    font-size: 13px;
    line-height: 1.45;
}

/* Inline announcements rendered above the option grid when the
   currently selected option carries extra.warning_html (red, bold)
   or extra.info_html (neutral, italic). Currently used by the
   ZDSK + GP electric-chain bundle to surface the SWL safety warning
   and the useful-load-reduced reminder; generic enough that any
   configurator can opt in. */
.xs-cfg-warning-banner {
    margin: 0 0 12px;
    padding: 10px 14px;
    background: #fff4f4;
    border: 1px solid #f0c2c2;
    border-left: 4px solid #c1272d;
    border-radius: 4px;
    color: #6e0d10;
    font-size: 13px;
    line-height: 1.45;
}

.xs-cfg-warning-banner strong {
    color: #c1272d;
    font-weight: 700;
}

.xs-cfg-info-banner {
    margin: 0 0 12px;
    padding: 8px 12px;
    background: #f5f8fb;
    border: 1px solid #d8e1ec;
    border-radius: 4px;
    color: #46566d;
    font-size: 12px;
    font-style: italic;
    line-height: 1.45;
}

.xs-cfg-info-banner em {
    font-weight: 600;
    color: #2c3a4d;
    font-style: normal;
}

/* Slider */
.xs-cfg-slider-wrap {
    position: relative;
    /* The 11 px lateral margin matches half a slider thumb (22 px), so the
       thumb centre travels exactly between the leftmost and rightmost tier
       label below — keeping the slider value visually aligned with its tier. */
    margin: 14px 11px 8px;
    height: 40px;
}

.xs-cfg-slider {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #d6dde5;
    border-radius: 3px;
    outline: none;
    margin: 16px 0 8px;
    position: relative;
    z-index: 2;
}

.xs-cfg-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #b91c1c;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.1s;
}

.xs-cfg-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

.xs-cfg-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #b91c1c;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.xs-cfg-slider-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 19px;
    height: 6px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 1;
}

.xs-cfg-tier-labels {
    /* Same 11 px lateral margin as the slider so labels align under the
       thumb travel range and the active tier sits directly under its value. */
    position: relative;
    height: 18px;
    margin: 4px 11px 0;
    font-size: 11px;
    color: #54637a;
}

/* Adaptive density: when the filtered capacity slider has 9-12
   visible tiers ("compact") or 13+ ("dense") the JS sets
   data-cfg-density on the wrapper. We shrink the font + tighten the
   layout so adjacent values don't overlap, while spacing stays
   perfectly uniform (handled by JS via `left: i/(N-1)*100%`). */
.xs-cfg-tier-labels[data-cfg-density="compact"] .xs-cfg-tier-label {
    font-size: 10.5px;
    letter-spacing: -0.02em;
}
.xs-cfg-tier-labels[data-cfg-density="dense"] .xs-cfg-tier-label {
    font-size: 9.5px;
    letter-spacing: -0.03em;
}

.xs-cfg-tier-label {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    transition: color 0.15s, font-weight 0.15s;
}

/* On dense scales (e.g. unified GP 100–6300 kg = 19 tiers) the
 * template marks every other tier with --minor so the visible labels
 * fit on a single line without overlapping. The hidden tiers stay in
 * the DOM (with data-cfg-tier-value) so JS can still apply
 * disabled/duty-class hints to them — only their text is hidden,
 * replaced by a thin tick mark so the slider still shows the
 * granularity. The active tier wins regardless of --minor and is
 * always rendered. */
.xs-cfg-tier-label--minor {
    color: transparent;
    width: 1px;
    overflow: hidden;
}
.xs-cfg-tier-label--minor::before {
    content: "·";
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    color: #b5bbc4;
    font-size: 14px;
    line-height: 1;
}
.xs-cfg-tier-label--minor[data-cfg-tier-active="true"] {
    /* When the active tier happens to be a --minor one, surface the
     * value at full opacity so the customer can see what's selected. */
    color: #b91c1c;
    font-weight: 700;
    width: auto;
    overflow: visible;
}
.xs-cfg-tier-label--minor[data-cfg-tier-active="true"]::before {
    content: none;
}

.xs-cfg-tier-label[data-cfg-tier-disabled="true"] {
    color: #c2c8d2;
    text-decoration: line-through;
}

.xs-cfg-tier-label[data-cfg-tier-active="true"] {
    color: #b91c1c;
    font-weight: 700;
}

/* Options */
.xs-cfg-options {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.xs-cfg-options--radio_card {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* `cards` widget — like radio_card but a touch denser. Used by
   GP electric hoist groups (capacity, phase, speed, control switch,
   radio remote) where labels are 1–3 short words and 240 px per
   column wastes vertical real-estate. */
.xs-cfg-options--cards {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

/* Ultra-compact layout for axis-style groups whose options are
   single short tokens ("3 m", "4 m", "125 kg"). Halves the column
   width so 4–5 cells fit on one row inside a 360 px-wide step
   panel, eliminating the 15-rows-tall list the customer reported
   2026-05-07 for `hoist_lift_gp`. Targeting by data attribute
   keeps the rule scoped and survives future widget renames. */
.xs-cfg-options[data-cfg-options-for="hoist_lift_gp"],
.xs-cfg-options[data-cfg-options-for="hoist_capacity_gp"] {
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 8px;
}

.xs-cfg-options[data-cfg-options-for="hoist_lift_gp"] .xs-cfg-option-card,
.xs-cfg-options[data-cfg-options-for="hoist_capacity_gp"] .xs-cfg-option-card {
    padding: 8px 6px;
    text-align: center;
    align-items: center;
    gap: 2px;
}

.xs-cfg-options[data-cfg-options-for="hoist_lift_gp"] .xs-cfg-option-card-label,
.xs-cfg-options[data-cfg-options-for="hoist_capacity_gp"] .xs-cfg-option-card-label {
    font-weight: 600;
    font-size: 14px;
}

.xs-cfg-options--toggle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.xs-cfg-options--select {
    grid-template-columns: minmax(0, 1fr);
}

.xs-cfg-option-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #d6dde5;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* Catalogue-gated cards (e.g. B/BF/BL speed profiles when no GIS
   variant in the family catalogues that combo at the current
   capacity/duty) are hidden via the `hidden` attribute so they take
   no layout space — required because the .xs-cfg-option-card
   `display: flex` rule would otherwise win over the user agent's
   default `[hidden] { display: none }`. */
.xs-cfg-option-card[hidden] {
    display: none !important;
    font-size: 13px;
    text-align: left;
}

.xs-cfg-option-card:hover {
    border-color: #b91c1c;
}

.xs-cfg-option-card[data-cfg-selected="true"] {
    border-color: #b91c1c;
    box-shadow: inset 0 0 0 1px #b91c1c;
    background: #fff5f5;
}

.xs-cfg-option-card-label {
    font-weight: 600;
    color: #0d1c2c;
}

.xs-cfg-option-card-desc {
    color: #54637a;
    font-size: 12px;
}

.xs-cfg-option-card-price {
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
    color: #0d1c2c;
}

.xs-cfg-option-card-price--tbd {
    color: #b45309;
    font-style: italic;
}

.xs-cfg-option-card-price--free {
    color: #166534;
}

/* Static spec label shown on cards whose price delta is structurally
   zero but where the customer benefits from seeing what they get
   (e.g. PMTC's GP capacity card → "M5 · GP500/2N · 4 m/min"). Quieter
   than +EUR labels — content is informational, not transactional. */
.xs-cfg-option-card-price--spec {
    color: #475569;
    font-size: 12px;
    letter-spacing: 0.01em;
}

/* Per-option delta labels for embedded sub-configurator groups
   (e.g. ZDSK's hoist_phase / hoist_speed / hoist_control_switch /
   hoist_radio_remote). The backend ships live EUR deltas vs the
   customer's current configuration so the cards can show "+ 288 EUR"
   / "− 6 EUR" instead of a uniform "Included". Kept at the default
   weight so long EUR labels (e.g. "+ 4 240,04 EUR") fit inside the
   card without crowding the right edge — color alone carries the
   up/down semantics. */
.xs-cfg-option-card-price--up {
    color: #b91c1c;
}

.xs-cfg-option-card-price--down {
    color: #166534;
}

/* Per-option lead-time badge ("Production: 5 weeks") shown on cards
   that pull in a child product (GP electric / RLD manual hoist). The
   parent ZDSK summary widget already displays the realistic bundle
   ETA via lead_weeks, but this badge surfaces *where* the longer
   lead time comes from so the customer never has to guess. */
.xs-cfg-option-card-lead {
    display: block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 8px;
    background: #eef4ff;
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 600;
    align-self: flex-start;
}

/* RAL picker */
.xs-cfg-ral-picker {
    margin-top: 12px;
    border: 1px solid #d6dde5;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.xs-cfg-ral-picker-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.xs-cfg-ral-search {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #d6dde5;
    border-radius: 6px;
    font-size: 13px;
}

.xs-cfg-ral-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    background: #f5f7fa;
    border-radius: 6px;
}

.xs-cfg-ral-swatch {
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    cursor: pointer;
    position: relative;
    transition: transform 0.1s;
}

.xs-cfg-ral-swatch:hover {
    transform: scale(1.08);
    z-index: 2;
}

.xs-cfg-ral-swatch[data-cfg-ral-selected="true"] {
    box-shadow: 0 0 0 2px #b91c1c, 0 0 0 4px #fff;
}

.xs-cfg-ral-swatch::after {
    content: attr(data-cfg-ral-code);
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translate(-50%, 100%);
    background: rgba(13, 28, 44, 0.92);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s;
    z-index: 3;
}

.xs-cfg-ral-swatch:hover::after {
    opacity: 1;
}

.xs-cfg-ral-current {
    margin-top: 10px;
    font-size: 12px;
    color: #54637a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.xs-cfg-ral-current-swatch {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Summary panel sits at the very bottom of the configurator — no longer sticky.
   On wide screens it becomes a 3-column "review & buy" footer. */
.xs-configurator-summary {
    margin-top: 8px;
}

.xs-cfg-summary-inner {
    border: 1px solid #d6dde5;
    border-radius: 12px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 4px 16px rgba(13, 28, 44, 0.06);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

@media (min-width: 900px) {
    .xs-cfg-summary-inner {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(240px, 0.9fr);
        grid-template-rows: auto auto auto auto auto;
        column-gap: 24px;
        row-gap: 12px;
        align-items: start;
    }

    .xs-cfg-summary-sku       { grid-column: 1; grid-row: 1; }
    .xs-cfg-summary-price-row { grid-column: 1; grid-row: 2; }
    .xs-cfg-breakdown         { grid-column: 1; grid-row: 3; }

    .xs-cfg-summary-meta      { grid-column: 2; grid-row: 1 / span 2; }
    .xs-cfg-shipping          { grid-column: 2; grid-row: 3; }

    .xs-cfg-cta-stack {
        grid-column: 3;
        grid-row: 1 / span 3;
        align-self: stretch;
        justify-content: center;
    }

    .xs-cfg-tbd-warning  { grid-column: 1 / -1; grid-row: 4; }
    .xs-cfg-cta-feedback { grid-column: 1 / -1; grid-row: 5; }
}

.xs-cfg-summary-label {
    color: #54637a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.xs-cfg-summary-sku {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.xs-cfg-summary-sku-value {
    font-size: 18px;
    color: #0d1c2c;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

/* "Selected GIS model" badge — only rendered when the configurator is
 * a unified family (e.g. gp_full) and compute_quote derived the
 * specific sub-model from capacity / duty class / speed profile. */
.xs-cfg-summary-derived {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f6ff;
    border-left: 3px solid #2563eb;
    border-radius: 4px;
    font-size: 13px;
}
.xs-cfg-summary-derived[hidden] { display: none !important; }
.xs-cfg-summary-derived-label {
    font-weight: 500;
    color: #1e3a8a;
}
.xs-cfg-summary-derived-value {
    font-size: 15px;
    font-weight: 700;
    color: #0d1c2c;
    letter-spacing: 0.02em;
}

.xs-cfg-summary-price-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px solid #eef1f5;
    padding-top: 12px;
}

.xs-cfg-summary-price {
    font-size: 26px;
    font-weight: 700;
    color: #b91c1c;
    font-variant-numeric: tabular-nums;
}

/* ---------- Anchor pricing (List crossed-out + Save badge) -------- */

.xs-cfg-anchor {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: -4px;
    font-size: 13px;
    line-height: 1.3;
}

.xs-cfg-anchor[hidden] {
    display: none;
}

.xs-cfg-anchor-list {
    color: #6b7588;
    font-variant-numeric: tabular-nums;
}

.xs-cfg-anchor-list s {
    color: #8a93a6;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}

.xs-cfg-anchor-save {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    padding: 2px 10px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}

/* ---------- Quantity input ---------------------------------------- */

.xs-cfg-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    border-top: 1px solid #eef1f5;
    padding-top: 12px;
}

.xs-cfg-qty-label {
    font-size: 13px;
    font-weight: 600;
    color: #0d1c2c;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.xs-cfg-qty-input-group {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #d4d9e1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.xs-cfg-qty-btn {
    background: #f5f7fa;
    border: 0;
    width: 32px;
    cursor: pointer;
    color: #0d1c2c;
    font-size: 16px;
    font-weight: 600;
    transition: background 120ms ease;
}

.xs-cfg-qty-btn:hover {
    background: #e9edf3;
}

.xs-cfg-qty-input {
    width: 56px;
    border: 0;
    border-left: 1px solid #d4d9e1;
    border-right: 1px solid #d4d9e1;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    background: #fff;
    color: #0d1c2c;
    -moz-appearance: textfield;
}

.xs-cfg-qty-input::-webkit-outer-spin-button,
.xs-cfg-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---------- Volume preview line ---------------------------------- */

.xs-cfg-volume-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #1f2f47;
    border-top: 1px solid #eef1f5;
    padding-top: 8px;
}

.xs-cfg-volume-preview[hidden] {
    display: none;
}

.xs-cfg-volume-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.xs-cfg-volume-line-label {
    color: #6b7588;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.xs-cfg-volume-line-value {
    font-size: 16px;
    font-weight: 700;
    color: #0d1c2c;
    font-variant-numeric: tabular-nums;
}

.xs-cfg-volume-savings {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: #047857;
    font-size: 12px;
}

.xs-cfg-volume-savings[hidden] {
    display: none;
}

.xs-cfg-volume-savings strong {
    font-variant-numeric: tabular-nums;
}

/* ---------- Tier table (volume pricing) -------------------------- */

.xs-cfg-tier-table {
    border-top: 1px solid #eef1f5;
    padding-top: 12px;
    font-size: 13px;
}

.xs-cfg-tier-table summary {
    cursor: pointer;
    user-select: none;
    color: #0d1c2c;
    font-weight: 600;
}

.xs-cfg-tier-grid {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.xs-cfg-tier-grid th,
.xs-cfg-tier-grid td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid #f1f3f7;
    font-size: 12.5px;
}

.xs-cfg-tier-grid th {
    color: #6b7588;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
}

.xs-cfg-tier-grid td:last-child {
    text-align: right;
    font-weight: 600;
    color: #047857;
}

.xs-cfg-tier-grid tr.is-active {
    background: #ecfdf5;
}

.xs-cfg-tier-grid tr.is-active td {
    color: #047857;
    font-weight: 700;
}

.xs-cfg-tier-bundle {
    margin: 8px 0 0;
    font-size: 12px;
    color: #4a5468;
    line-height: 1.45;
}

.xs-cfg-tier-bundle strong {
    color: #047857;
}

.xs-cfg-breakdown {
    border-top: 1px solid #eef1f5;
    padding-top: 12px;
    font-size: 13px;
}

.xs-cfg-breakdown summary {
    cursor: pointer;
    user-select: none;
    color: #0d1c2c;
    font-weight: 600;
}

.xs-cfg-breakdown-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
}

.xs-cfg-breakdown-table th,
.xs-cfg-breakdown-table td {
    padding: 6px 0;
    text-align: left;
    font-size: 12px;
    color: #54637a;
    vertical-align: top;
}

.xs-cfg-breakdown-table td:last-child,
.xs-cfg-breakdown-table th:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #0d1c2c;
}

.xs-cfg-breakdown-table tfoot th,
.xs-cfg-breakdown-table tfoot td {
    border-top: 1px solid #eef1f5;
    padding-top: 8px;
    font-weight: 700;
    color: #0d1c2c;
}

.xs-cfg-summary-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #eef1f5;
    padding-top: 12px;
    font-size: 13px;
}

.xs-cfg-summary-meta li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.xs-cfg-summary-meta span {
    color: #54637a;
}

.xs-cfg-summary-meta strong {
    color: #0d1c2c;
    font-variant-numeric: tabular-nums;
}

.xs-cfg-shipping {
    border-top: 1px solid #eef1f5;
    padding-top: 12px;
    font-size: 13px;
}

.xs-cfg-shipping-head {
    color: #54637a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.xs-cfg-shipping-dest {
    margin: 4px 0 8px;
}

.xs-cfg-shipping-dest-label {
    display: block;
    color: #54637a;
    font-size: 11px;
    margin-bottom: 4px;
}

.xs-cfg-shipping-dest-row {
    display: flex;
    gap: 6px;
}

.xs-cfg-shipping-dest-country,
.xs-cfg-shipping-dest-postal {
    border: 1px solid #d5dbe3;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 13px;
    background: #fff;
    color: #0d1c2c;
    min-width: 0;
}

.xs-cfg-shipping-dest-country {
    flex: 1 1 60%;
}

.xs-cfg-shipping-dest-postal {
    flex: 0 1 40%;
}

.xs-cfg-shipping-dest-country:focus,
.xs-cfg-shipping-dest-postal:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
    border-color: #2563eb;
}

.xs-cfg-shipping-value {
    font-size: 18px;
    font-weight: 600;
    color: #0d1c2c;
    font-variant-numeric: tabular-nums;
}

.xs-cfg-shipping[data-cfg-shipping-state="pending"] .xs-cfg-shipping-value {
    color: #92400e;
    font-size: 13px;
    font-weight: 500;
    font-style: italic;
}

.xs-cfg-shipping-note {
    margin: 6px 0 0;
    color: #54637a;
    font-size: 11px;
    line-height: 1.4;
}

.xs-cfg-tbd-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #92400e;
    font-size: 12px;
    line-height: 1.45;
    padding: 10px 12px;
    border-radius: 8px;
}

.xs-cfg-cta-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.xs-cfg-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.15s, color 0.15s;
}

.xs-cfg-btn--primary {
    background: #b91c1c;
    color: #fff;
}

.xs-cfg-btn--primary:hover {
    background: #991b1b;
}

.xs-cfg-btn--primary:disabled {
    background: #c2c8d2;
    cursor: not-allowed;
}

.xs-cfg-btn--ghost {
    background: transparent;
    color: #b91c1c;
    border: 1px solid #b91c1c;
}

.xs-cfg-btn--ghost:hover {
    background: #fff5f5;
}

.xs-cfg-btn--danger {
    background: #b91c1c;
    color: #fff;
    border: 1px solid #b91c1c;
}

.xs-cfg-btn--danger:hover {
    background: #991b1b;
    border-color: #991b1b;
}

.xs-cfg-reset-row {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
}

.xs-cfg-reset-link {
    appearance: none;
    background: transparent;
    border: 0;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
}

.xs-cfg-reset-link:hover,
.xs-cfg-reset-link:focus-visible {
    color: #b91c1c;
    text-decoration: underline;
    outline: none;
}

.xs-cfg-cta-feedback {
    font-size: 12px;
    color: #166534;
    min-height: 16px;
}

.xs-cfg-cta-feedback[data-feedback-kind="error"] {
    color: #b91c1c;
}

.xs-cfg-noscript {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
}

/* Save modal */
.xs-cfg-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xs-cfg-modal[hidden] {
    display: none;
}

.xs-cfg-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 28, 44, 0.55);
}

.xs-cfg-modal-dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    padding: 24px 24px 18px;
    width: min(92vw, 440px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.xs-cfg-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: 0;
    font-size: 24px;
    color: #54637a;
    cursor: pointer;
    line-height: 1;
}

.xs-cfg-modal-title {
    margin: 0 0 6px;
    font-size: 18px;
    color: #0d1c2c;
}

.xs-cfg-modal-help {
    margin: 0 0 14px;
    font-size: 13px;
    color: #54637a;
    line-height: 1.45;
}

.xs-cfg-modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.xs-cfg-modal-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #0d1c2c;
}

.xs-cfg-modal-field input[type="email"],
.xs-cfg-modal-field input[type="text"] {
    padding: 8px 10px;
    border: 1px solid #d6dde5;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}

.xs-cfg-modal-field--check {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.xs-cfg-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.xs-cfg-modal-actions--split {
    justify-content: space-between;
    gap: 12px;
}

.xs-cfg-modal-dialog--narrow {
    max-width: 420px;
}

.xs-cfg-modal-feedback {
    font-size: 13px;
    color: #166534;
    min-height: 18px;
}

.xs-cfg-modal-feedback[data-feedback-kind="error"] {
    color: #b91c1c;
}

/* ---------------------------------------------------------------
 * Control-cable length picker (slider + numeric input + std btn)
 * Used for groups with ui_widget="cable_length_picker".
 * --------------------------------------------------------------- */
.xs-cfg-cable-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f7fafc;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    padding: 14px 16px;
}

.xs-cfg-cable-hint {
    font-size: 13px;
    color: #344155;
    line-height: 1.4;
}

.xs-cfg-cable-hint-label {
    color: #54637a;
}

.xs-cfg-cable-hint-flag {
    color: #166534;
    font-size: 12px;
    font-weight: 500;
}

.xs-cfg-cable-hint-flag--custom {
    color: #92400e;
}

.xs-cfg-cable-row {
    display: grid;
    grid-template-columns: 1fr 90px auto auto;
    align-items: center;
    gap: 10px;
}

@media (max-width: 600px) {
    .xs-cfg-cable-row {
        grid-template-columns: 1fr 80px auto;
        grid-template-areas:
            "slider slider slider"
            "input  unit   stdbtn";
        gap: 8px;
    }
    .xs-cfg-cable-slider { grid-area: slider; }
    .xs-cfg-cable-input  { grid-area: input; }
    .xs-cfg-cable-unit   { grid-area: unit; }
    .xs-cfg-cable-std-btn { grid-area: stdbtn; }
}

.xs-cfg-cable-slider {
    width: 100%;
    accent-color: #2563eb;
    height: 24px;
}

.xs-cfg-cable-input {
    height: 36px;
    padding: 6px 10px;
    border: 1px solid #cfd6e0;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    text-align: right;
    width: 100%;
}

.xs-cfg-cable-input:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
    border-color: #2563eb;
}

.xs-cfg-cable-unit {
    color: #54637a;
    font-size: 13px;
    font-weight: 500;
}

.xs-cfg-cable-std-btn {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #2563eb;
    border-radius: 6px;
    background: #fff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.xs-cfg-cable-std-btn:hover:not(:disabled) {
    background: #2563eb;
    color: #fff;
}

.xs-cfg-cable-std-btn:disabled {
    border-color: #cfd6e0;
    color: #97a2b1;
    cursor: default;
}

.xs-cfg-cable-preview {
    font-size: 13px;
    color: #344155;
    background: #fff;
    border: 1px dashed #cfd6e0;
    border-radius: 6px;
    padding: 8px 12px;
    font-variant-numeric: tabular-nums;
}

/* =====================================================================
   Step 0 — Duty class (FEM A3-A7 / ISO M3-M7) wizard
   Sits above the configurator layout to force the customer to declare
   their intended use BEFORE picking capacity. Each card carries its
   own colour token (--cfg-duty-color) injected by the server seed.
   ===================================================================== */
.xs-cfg-duty {
    margin: 24px 0 28px;
    padding: 22px 22px 18px;
    background: linear-gradient(135deg, #fbfcfd 0%, #f3f6fa 100%);
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03), 0 4px 14px rgba(15, 23, 42, .04);
}

.xs-cfg-duty-head {
    margin-bottom: 16px;
}

.xs-cfg-duty-step {
    display: inline-block;
    background: #1a1f2c;
    color: #fff;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.xs-cfg-duty-title {
    margin: 0 0 6px;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
}

.xs-cfg-duty-subtitle {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: #475569;
}

.xs-cfg-duty-subtitle strong {
    color: #b91c1c;
    font-weight: 600;
}

.xs-cfg-duty-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.xs-cfg-duty-card {
    --cfg-duty-color: #64748b;
    text-align: left;
    cursor: pointer;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    transition: transform .15s ease, border-color .15s ease,
                box-shadow .15s ease;
    overflow: hidden;
    color: inherit;
    font: inherit;
    min-height: 184px;
}

.xs-cfg-duty-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cfg-duty-color);
    opacity: .85;
}

.xs-cfg-duty-card:hover {
    transform: translateY(-2px);
    border-color: var(--cfg-duty-color);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
}

.xs-cfg-duty-card:focus-visible {
    outline: 2px solid var(--cfg-duty-color);
    outline-offset: 2px;
}

.xs-cfg-duty-card[aria-checked="true"] {
    border-color: var(--cfg-duty-color);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--cfg-duty-color) 8%, #fff) 0%,
        #fff 60%);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cfg-duty-color) 22%, transparent),
                0 6px 20px rgba(15, 23, 42, .1);
}

.xs-cfg-duty-card[aria-checked="true"]::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 10px;
    width: 22px;
    height: 22px;
    background: var(--cfg-duty-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.xs-cfg-duty-card-class {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 700;
    font-size: 18px;
    color: var(--cfg-duty-color);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.xs-cfg-duty-card-sep {
    font-weight: 400;
    color: #94a3b8;
}

.xs-cfg-duty-card-iso {
    font-size: 16px;
}

.xs-cfg-duty-card-label {
    font-size: 14.5px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
}

.xs-cfg-duty-card-tagline {
    font-size: 12.5px;
    color: #475569;
    font-weight: 500;
}

.xs-cfg-duty-card-meta {
    font-size: 11.5px;
    color: #64748b;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}

.xs-cfg-duty-card-desc {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.4;
    margin-top: 4px;
}

.xs-cfg-duty-warning {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-left: 4px solid #d97706;
    border-radius: 8px;
    color: #78350f;
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.xs-cfg-duty-warning[hidden] {
    display: none !important;
}

.xs-cfg-duty-warning-icon {
    font-size: 18px;
    line-height: 1;
    flex: 0 0 auto;
    margin-top: 1px;
}

/* Responsive — collapse to 2 columns on tablet, 1 column on phone */
@media (max-width: 980px) {
    .xs-cfg-duty-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .xs-cfg-duty-card {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .xs-cfg-duty {
        padding: 16px 14px 14px;
        margin: 16px 0 20px;
    }
    .xs-cfg-duty-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }
    .xs-cfg-duty-card {
        padding: 12px 14px 10px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        min-height: 0;
        flex-wrap: wrap;
    }
    .xs-cfg-duty-card-class {
        flex: 0 0 auto;
        font-size: 17px;
    }
    .xs-cfg-duty-card-label {
        flex: 1 1 auto;
        font-size: 14px;
    }
    .xs-cfg-duty-card-tagline,
    .xs-cfg-duty-card-meta,
    .xs-cfg-duty-card-desc {
        flex: 1 1 100%;
    }
    .xs-cfg-duty-card-meta {
        margin-top: 0;
        padding-top: 4px;
    }
    .xs-cfg-duty-card-desc {
        display: none;  /* description hidden on phone — title is enough */
    }
    .xs-cfg-duty-card[aria-checked="true"] .xs-cfg-duty-card-desc {
        display: block;  /* but show on the selected card */
    }
}

/* Greyed-out capacity tier — used by JS when the value exceeds the
   selected duty class envelope (e.g. M7 + 250 kg on GP250). */
.xs-cfg-tier-label--duty-unavailable {
    color: #cbd5e1 !important;
    text-decoration: line-through;
    cursor: not-allowed;
}
