.ups-configurator {
    --ups-ink: #252525;
    --ups-muted: #8a8a8a;
    --ups-line: #e6e6e6;
    color: var(--ups-ink);
    background: #fff;
    min-height: calc(100vh - 70px);
    padding-bottom: 40px;
}

.ups-configurator__workspace {
    padding-top: 18px;
}

.ups-configurator__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--ups-line);
    padding-bottom: 16px;
}

.ups-configurator__heading h1 {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 500;
    margin: 0 0 8px;
}

.ups-configurator__heading p {
    color: var(--ups-muted);
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

.ups-configurator__heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    flex: 0 0 auto;
}

.ups-configurator__availability,
.ups-configurator__strict-match {
    min-height: auto;
    margin: 0;
    font-size: 14px;
}

.ups-configurator__filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 24px;
}

.ups-configurator__filter-actions .form-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding-left: 0;
}

.ups-configurator__filter-actions .form-switch .form-check-input {
    float: none;
    flex-shrink: 0;
    /* Общие стили сайта задают ширину и смещение переключателей через !important. */
    width: 36px !important;
    height: 20px;
    margin: 0 !important;
    left: 0 !important;
}

.ups-configurator__availability .form-check-input,
.ups-configurator__availability .form-check-label,
.ups-configurator__strict-match .form-check-input,
.ups-configurator__strict-match .form-check-label {
    cursor: pointer;
}

.ups-configurator__widget-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #686868;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.ups-configurator__widget-link:hover {
    color: #333;
    text-decoration: none;
}

.ups-configurator__catalog-stat {
    color: var(--ups-muted);
    font-size: 12px;
    white-space: nowrap;
}

.ups-configurator__catalog-stat b {
    color: #555;
    font-weight: 500;
}

.ups-configurator__widget-brand {
    color: #777;
    font-size: 12px;
    margin-top: 6px;
}

.ups-configurator__form {
    background: #f7f7f7;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    margin-top: 16px;
    padding: 16px;
}

.ups-configurator__primary-fields {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(230px, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.ups-configurator__field,
.ups-configurator__field-copy,
.ups-configurator__label,
.ups-configurator__hint {
    display: block;
}

.ups-configurator__field {
    margin: 0;
}

.ups-configurator__field-copy {
    min-height: 38px;
    margin-bottom: 6px;
}

.ups-configurator__label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.ups-configurator__hint {
    color: var(--ups-muted);
    font-size: 11px;
    line-height: 1.25;
}

.ups-configurator__input-wrap .form-control,
.ups-configurator__input-wrap .input-group-text {
    min-height: 38px;
    font-size: 13px;
}

.ups-configurator__input-wrap .form-control {
    background: #fff;
}

#ups-configurator-load-watts {
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

.ups-configurator__input-wrap .input-group-text {
    color: #777;
    background: #f1f1f1;
}

.ups-configurator__submit {
    min-width: 160px;
    min-height: 38px;
    font-size: 12px;
    font-weight: 500;
}

.ups-configurator__form-error {
    color: #a52810;
    background: #fff1ed;
    border-radius: 6px;
    margin-top: 12px;
    padding: 9px 12px;
}

.ups-configurator__secondary {
    border: 0;
    border-top: 1px solid #e1e1e1;
    margin: 16px 0 0;
    padding: 14px 0 0;
}

.ups-configurator__secondary legend {
    float: none;
    width: auto;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 10px;
}

.ups-configurator__secondary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ups-configurator__secondary-grid label > span {
    display: block;
    color: #555;
    font-size: 11px;
    font-weight: 500;
    margin: 0 0 5px;
}

.ups-configurator__secondary-grid label b {
    font-weight: 500;
}

.ups-configurator__secondary-grid .form-select,
.ups-configurator__secondary-grid select.js-select:not(.tomselected),
.ups-configurator__secondary-grid .app-select .ts-control {
    font-size: 12px;
    min-height: 38px;
}

.ups-configurator__results {
    scroll-margin-top: 90px;
    padding-top: 22px;
}

.ups-configurator__catalog-filter-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: #f5f8ff;
    border: 1px solid #dbe7ff;
    border-radius: 10px;
}

.ups-configurator__catalog-filter-bar[hidden],
.ups-configurator__catalog-filters[hidden],
.ups-configurator__loading[hidden] {
    display: none;
}

.ups-configurator__catalog-title {
    color: #777;
    font-size: 18px;
    font-weight: 400;
}

.ups-configurator__catalog-count {
    color: #a0a0a0;
    margin-left: 6px;
}

.ups-configurator__filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    min-width: 112px;
    color: #fff;
    background: #0d6efd;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    padding: 10px 16px;
    transition: background-color .2s;
}

.ups-configurator__filter-toggle i {
    font-size: 14px;
}

.ups-configurator__filter-toggle:hover:not(:disabled),
.ups-configurator__filter-toggle:focus-visible {
    color: #fff;
    background: #0b5ed7;
}

.ups-configurator__filter-toggle:focus-visible {
    outline: 3px solid #90baff;
    outline-offset: 3px;
}

.ups-configurator__filter-toggle:disabled {
    opacity: .55;
    cursor: default;
}

.ups-configurator__filter-toggle.active {
    color: #fff;
    background: #084298;
}

.ups-configurator__catalog-filters {
    margin-bottom: 18px;
}

.ups-configurator__catalog-filters .additional-features {
    min-height: 180px;
}

.ups-configurator__catalog-filters .filters_properties_element {
    position: relative;
}

.ups-configurator__catalog-filters .filters_properties_element.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 8px;
    width: 4px;
    height: 4px;
    background: #0d6efd;
    border-radius: 50%;
}

.ups-configurator__catalog-filters .form-check {
    margin-left: 6px;
}

.ups-configurator__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 180px;
    color: var(--ups-muted);
}

.ups-configurator__products {
    min-height: 1px;
}

.ups-configurator__products .category-products {
    background: #fff;
}

.ups-configurator__products .table-products {
    margin-bottom: 0;
}

.ups-configurator__row-note {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: #5f6871;
    font-size: 11px;
    line-height: 1.35;
    margin-top: 5px;
}

.ups-configurator__row-note strong {
    color: #287a45;
    font-weight: 600;
}

.ups-configurator__row-note--battery {
    color: #a52810;
    font-weight: 600;
}

.ups-configurator__row-note--unknown,
.ups-configurator__row-note--unknown strong {
    color: #9a6a12;
}

.ups-configurator__battery-row > td {
    background: #fff7f4 !important;
    border-bottom-color: #f1c2b6 !important;
}

body.mobile .ups-configurator__battery-row > .body {
    background: #fff7f4;
    border-left: 3px solid #dc3545;
}

.ups-configurator__empty {
    background: #fff;
    border: 1px solid var(--ups-line);
    border-radius: 10px;
    text-align: center;
    padding: 42px 24px;
}

.ups-configurator__empty i {
    color: #888;
    font-size: 24px;
}

.ups-configurator__empty h3 {
    font-size: 18px;
    margin: 10px 0 5px;
}

.ups-configurator__empty p {
    color: var(--ups-muted);
    margin: 0;
}

.ups-configurator__more-wrap {
    text-align: center;
    padding-top: 20px;
}

.ups-configurator__more-wrap .btn {
    min-width: 190px;
}

.ups-configurator__method {
    display: flex;
    gap: 10px;
    color: #858585;
    border-top: 1px solid var(--ups-line);
    margin-top: 22px;
    padding: 14px 2px 0;
}

.ups-configurator__method-icon {
    flex: 0 0 auto;
    color: #999;
    font-size: 14px;
}

.ups-configurator__method strong {
    display: block;
    color: #555;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}

.ups-configurator__method p {
    font-size: 11px;
    line-height: 1.45;
    margin: 0;
}

.ups-configurator--widget {
    min-height: 0;
    padding-bottom: 24px;
}

/* Reuse the PC configurator's flyisland, cart-control and button styles.
   Only the placement adapts to the UPS results and the iframe width. */
.ups-widget-order {
    position: sticky;
    bottom: 20px;
    z-index: 1010;
    width: max-content;
    max-width: 100%;
    margin: 24px auto 0;
    background: none;
}
.ups-widget-order .flyisland-cover {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
}
.ups-widget-order .body-flyisland {
    min-height: 46px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 4px;
}
.ups-widget-order-summary { display: flex; align-items: center; flex-wrap: wrap; }
.ups-widget-order-cell { width: 140px; min-width: 100px; text-align: center; }
.ups-widget-controls { display: flex; justify-content: center; }
.ups-configurator .ups-widget-controls .cart-control.ups-widget-quantity {
    display: inline-flex;
    align-items: center;
    float: none;
    width: auto;
    max-width: none;
    margin: 0;
}
.ups-configurator .ups-widget-controls .ups-widget-quantity .cart-control-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    padding: 3px;
    border: 0;
    background: none;
}
.ups-widget-quantity [data-quantity-delta="-1"] { color: #d8d8d8; }
.ups-widget-quantity [data-quantity-delta="1"] { color: var(--bs-primary); }
.ups-configurator .ups-widget-controls .ups-widget-quantity .cart-control-input {
    display: block;
    flex: 0 0 auto;
    top: 0;
    height: 28px;
    padding: 0;
    line-height: 28px;
    color: #ababab;
    appearance: textfield;
}
.ups-widget-quantity input::-webkit-inner-spin-button,
.ups-widget-quantity input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.mobile .ups-configurator .ups-widget-controls .cart-control-btn {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    font-size: 28px;
}
.mobile .ups-configurator .ups-widget-controls .cart-control-input {
    height: 36px;
    line-height: 36px;
    font-size: 20px;
}
.ups-widget-dialog.configurator-widget-contact-panel { margin: auto; inset: 0; width: calc(100% - 32px); max-height: 90vh; border: 0; }
.ups-widget-dialog::backdrop { background: rgba(255, 255, 255, .85); }
.ups-widget-review-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid #f1f1f1; }
.ups-widget-review-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.ups-widget-review-row small { display: block; color: #777; margin-top: 4px; }
.ups-widget-review-row .ups-widget-controls { flex: 0 0 auto; }
.ups-widget-dialog [hidden] { display: none !important; }
@media (max-width: 767.98px) {
    .ups-widget-order { bottom: 12px; }
    .ups-widget-order .body-flyisland { gap: 4px; padding: 6px; }
    .ups-widget-order-summary { justify-content: center; }
    .ups-widget-order-label { display: none; }
    .ups-widget-review-row { align-items: flex-start; }
    .ups-configurator--widget .table-products { display: block; overflow-x: auto; }
}

@media (max-width: 991.98px) {
    .ups-configurator__primary-fields {
        grid-template-columns: 1fr 1fr;
    }

    .ups-configurator__submit {
        grid-column: 1 / -1;
    }

    .ups-configurator__secondary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .ups-configurator {
        padding-bottom: 28px;
    }

    .ups-configurator__workspace {
        padding: 14px 12px 0;
    }

    .ups-configurator__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .ups-configurator__heading h1 {
        font-size: 18px;
    }

    .ups-configurator__heading-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .ups-configurator__form {
        border-radius: 10px;
        padding: 14px;
    }

    .ups-configurator__primary-fields,
    .ups-configurator__secondary-grid {
        grid-template-columns: 1fr;
    }

    .ups-configurator__submit {
        width: 100%;
    }

    .ups-configurator__filter-actions {
        width: 100%;
        gap: 8px 20px;
    }

    .ups-configurator__row-note {
        display: block;
        font-size: 10px;
    }

    .ups-configurator__row-note span {
        display: block;
        margin-top: 2px;
    }
}
