.ltg-route-calculator {
    color: #000;
    font-size: 16px;
}

.ltg-route-calculator__title {
    margin: 0 0 40px;
    font-size: 18px;
    line-height: 1.2;
}

.ltg-route-calculator__layout {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 20px;
}

.ltg-route-calculator__fields,
.ltg-route-calculator__map-col {
    width: 50%;
    padding: 0 10px;
    box-sizing: border-box;
}

.ltg-route-calculator__gauge {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

.ltg-route-calculator__gauge legend {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    float: none;
    font-size: 14px;
    font-weight: 600;
}

.ltg-route-calculator__gauge label {
    margin-right: 20px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
}

.ltg-route-calculator__gauge label:last-child {
    margin-right: 0;
}

.ltg-route-calculator__gauge input {
    margin-right: 5px;
}

.ltg-route-calculator__field {
    display: block;
    margin: 0;
    font-weight: 400;
}

.ltg-route-calculator__field > span:not(.ltg-route-calculator__select) {
    display: block;
    color: #000;
    font-size: 14px;
    font-weight: 700;
    user-select: none;
}

.ltg-route-calculator__field input,
.ltg-route-calculator__field select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 41px;
    margin: 0 0 10px;
    padding: 10px;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    background: #fff;
    color: #000;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

.ltg-route-calculator__field input:disabled,
.ltg-route-calculator__field select:disabled {
    background: #f4f5f8;
}

.ltg-route-calculator__field [data-mileage]:disabled {
    border: 2px solid #007749;
    background: #f5f5f5;
    font-weight: 700;
}

.ltg-route-calculator__field.is-invalid input,
.ltg-route-calculator__field.is-invalid select,
.ltg-route-calculator__field.is-invalid .ltg-route-calculator__select-toggle {
    border-color: #f8423a;
}

.ltg-route-calculator__field select.ltg-route-calculator__native {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

.ltg-route-calculator__select {
    position: relative;
    display: block;
}

.ltg-route-calculator__select-toggle {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 41px;
    margin: 0 0 10px;
    padding: 10px 32px 10px 10px;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    background: #fff;
    color: #000;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.ltg-route-calculator__select-toggle:disabled {
    background: #f4f5f8;
    cursor: default;
}

.ltg-route-calculator__select-toggle.is-open {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.ltg-route-calculator__select-value {
    display: block;
    overflow: hidden;
    font-size: 13px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ltg-route-calculator__select-chevron {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 8px;
}

.ltg-route-calculator__select-chevron svg {
    display: block;
    transform: rotate(180deg);
}

.ltg-route-calculator__select-menu {
    position: absolute;
    top: calc(100% - 11px);
    left: 0;
    z-index: 1030;
    width: 100%;
    min-width: 200px;
    max-height: 33dvh;
    box-sizing: border-box;
    padding: 10px;
    overflow: auto;
    border: 1px solid #e3e3e3;
    border-radius: 0 0 10px 10px;
    background: #fff;
}

.ltg-route-calculator__select-search {
    margin-bottom: 8px;
}

.ltg-route-calculator__field .ltg-route-calculator__select-search-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
}

.ltg-route-calculator__select-search-input:focus {
    border-color: var(--ltg-color-primary, #007749);
    outline: none;
}

.ltg-route-calculator__select-options {
    max-height: 25dvh;
    overflow-y: auto;
}

.ltg-route-calculator__select-option {
    display: block;
    width: 100%;
    margin: 0;
    padding: 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #000;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.ltg-route-calculator__select-option:hover {
    background: #d0dbef;
}

.ltg-route-calculator__select-option.is-active {
    background: var(--ltg-color-primary, #007749);
    color: #fff;
}

.ltg-route-calculator__select-empty {
    padding: 12px;
    color: #888;
    font-size: 13px;
    text-align: center;
}

.ltg-route-calculator__field small {
    display: block;
    margin: -10px 0 10px;
    color: #666;
    font-size: 12px;
    font-weight: 400;
}

.ltg-route-calculator__manual {
    display: flex;
    align-items: center;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

.ltg-route-calculator__manual input {
    margin: 0 8px 0 0;
}

.ltg-route-calculator__field[data-field="mileage"] {
    margin-bottom: 20px;
}

.ltg-route-calculator [data-mileage-error] {
    color: #d32f2f;
}

.ltg-route-calculator__map {
    height: 400px;
    overflow: hidden;
    background: #fff;
}

.ltg-route-calculator__map .leaflet-container {
    width: 100%;
    height: 100%;
    font: inherit;
}

.ltg-route-calculator__marker {
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #007749;
    font-size: 16px;
}

.ltg-route-calculator__route {
    margin-bottom: 35px;
    font-size: 14px;
}

.ltg-route-calculator__route > strong {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.ltg-route-calculator__stops {
    width: 100%;
    margin: 0 0 12px;
    padding: 10px;
    border: 2px solid #007749;
    border-radius: 10px;
    background: #f5f5f5;
}

.ltg-route-calculator__route > p {
    margin: 0 0 15px;
}

.ltg-route-calculator__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ltg-route-calculator__actions .btn,
.ltg-route-calculator [data-calculate] {
    width: fit-content;
    max-width: 100%;
}

.ltg-route-calculator table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ltg-route-calculator__routes {
    overflow: auto;
    margin-bottom: 30px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fff;
}

.ltg-route-calculator th,
.ltg-route-calculator td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}

.ltg-route-calculator td:first-child {
    width: 40px;
    text-align: right;
    white-space: nowrap;
}

.ltg-route-calculator__swatch {
    display: inline-block;
    width: 4px;
    height: 20px;
    margin-right: 6px;
    vertical-align: top;
}

.ltg-route-calculator thead tr {
    background: #fafafa;
}

.ltg-route-calculator th:first-child {
    width: 40px;
    text-align: right;
}

.ltg-route-calculator tbody tr {
    cursor: pointer;
}

.ltg-route-calculator tr.is-selected {
    background: #e3f2fd;
}

.ltg-route-calculator__weights {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    margin: 0 -10px;
}

.ltg-route-calculator__weights .ltg-route-calculator__field {
    width: 33.33333%;
    padding: 0 10px;
    box-sizing: border-box;
}

.ltg-route-calculator__submit {
    margin-top: 20px;
}

.ltg-route-calculator__errors {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #f44336;
    border-radius: 6px;
    background: #ffebee;
    color: #c62828;
}

.ltg-route-calculator__errors ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.ltg-route-calculator [data-calculate] {
    margin-bottom: 15px;
}

.ltg-route-calculator__results {
    margin-top: 20px;
}

.route-calc-results {
    display: flex;
    gap: 24px;
}

.calc-result {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ltg-route-calculator__price-label {
    display: block;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.ltg-route-calculator__info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border: 1px solid #000;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
}

.ltg-route-calculator__info span {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    z-index: 2;
    width: max-content;
    min-width: 200px;
    max-width: 350px;
    padding: 8px 12px;
    transform: translateX(-50%) translateY(-8px);
    border-radius: 6px;
    background: #fff;
    color: #000;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.ltg-route-calculator__info:hover span,
.ltg-route-calculator__info:focus span {
    display: block;
}

.ltg-route-calculator [data-service-price] {
    color: #2e7d32;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.ltg-route-calculator [data-traffic-price],
.ltg-route-calculator [data-segment-price] {
    font-size: 18px;
    font-weight: 700;
}

.ltg-route-calculator__note {
    margin-top: 2.5rem;
    font-size: 14px;
}

@media (min-width: 768px) {
    .route-calc-results > .calc-result:not(:first-child) {
        padding-left: 24px;
        border-left: 1px solid #000;
    }
}

@media (max-width: 767.98px) {
    .ltg-route-calculator__fields,
    .ltg-route-calculator__map-col,
    .ltg-route-calculator__weights .ltg-route-calculator__field {
        width: 100%;
    }

    .ltg-route-calculator__map-col {
        margin-top: 20px;
    }

    .route-calc-results {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .route-calc-results > .calc-result {
        padding: 16px 0;
        border-top: 1px solid #000;
    }

    .route-calc-results > .calc-result:first-child {
        padding-top: 0;
        border-top: 0;
    }
}
