.tr-ui.tr-searchbar {
    --tr-searchbar-border: var(--tr-border);
    --tr-searchbar-focus: var(--tr-shadow-focus);
    --tr-searchbar-button-text: var(--tr-on-primary);

    max-width: 100%;
    background: #fff;
    border: 1px solid var(--tr-searchbar-border);
    border-radius: 12px;
    box-shadow: none !important;
    padding: 10px;
}

.tr-ui.tr-searchbar .tr-searchbar__form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.tr-ui.tr-searchbar .tr-searchbar__form > .tr-control {
    min-width: 0;
    flex: 1 1 200px;
}

.tr-ui.tr-searchbar .tr-searchbar__form > .tr-control--search {
    flex: 2 1 260px;
}

.tr-ui.tr-searchbar .tr-searchbar__form > .tr-control--location {
    flex: 1.2 1 210px;
}

.tr-ui.tr-searchbar .tr-searchbar__form > .tr-control--distance {
    flex: 0.8 1 150px;
}

.tr-ui.tr-searchbar .tr-searchbar__actions {
    margin-left: auto;
    flex: 0 0 auto;
}

.tr-ui.tr-searchbar .tr-searchbar__actions .tr-button {
    min-width: 116px;
    padding-inline: 14px;
    color: var(--tr-searchbar-button-text) !important;
}

.tr-ui.tr-searchbar .tr-searchbar__actions button.tr-button {
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    background: var(--tr-primary) !important;
    border-color: var(--tr-primary) !important;
    background-image: none !important;
    color: var(--tr-searchbar-button-text) !important;
    outline: none;
}

.tr-ui.tr-searchbar .tr-searchbar__actions .tr-button:hover,
.tr-ui.tr-searchbar .tr-searchbar__actions .tr-button:active,
.tr-ui.tr-searchbar .tr-searchbar__actions .tr-button:focus,
.tr-ui.tr-searchbar .tr-searchbar__actions .tr-button:focus-visible {
    color: var(--tr-searchbar-button-text) !important;
}

.tr-ui.tr-searchbar .tr-searchbar__actions button.tr-button:hover,
.tr-ui.tr-searchbar .tr-searchbar__actions button.tr-button:focus,
.tr-ui.tr-searchbar .tr-searchbar__actions button.tr-button:focus-visible,
.tr-ui.tr-searchbar .tr-searchbar__actions button.tr-button:active {
    background: var(--tr-primary) !important;
    border-color: var(--tr-primary) !important;
    background-image: none !important;
    color: var(--tr-searchbar-button-text) !important;
}

.tr-ui.tr-searchbar .tr-searchbar__actions button.tr-button:focus,
.tr-ui.tr-searchbar .tr-searchbar__actions button.tr-button:focus-visible {
    box-shadow: var(--tr-shadow-focus) !important;
}

.tr-ui.tr-searchbar .tr-label {
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--tr-secondary);
}

.tr-ui.tr-searchbar .tr-input,
.tr-ui.tr-searchbar .tr-select {
    height: 44px;
    border-radius: 9px;
    border-color: var(--tr-searchbar-border);
    box-shadow: none;
}

.tr-ui.tr-searchbar .tr-input:focus,
.tr-ui.tr-searchbar .tr-input:focus-visible,
.tr-ui.tr-searchbar .tr-select:focus,
.tr-ui.tr-searchbar .tr-select:focus-visible {
    border-color: var(--tr-primary);
    box-shadow: 0 0 0 2px var(--tr-searchbar-focus);
}

.tr-ui.tr-searchbar .tr-control__location {
    position: relative;
}

.tr-ui.tr-searchbar .tr-control__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;

    max-height: 220px;
    overflow-y: auto;

    border: 1px solid var(--tr-searchbar-border);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 16px color-mix(in srgb, var(--tr-secondary) 18%, transparent);
}

.tr-ui.tr-searchbar .tr-location-option {
    width: 100%;
    padding: 9px 11px;
    border: 0;
    text-align: left;
    background: transparent;
    color: var(--tr-text);
    font: inherit;
    cursor: pointer;
}

.tr-ui.tr-searchbar .tr-location-option:hover,
.tr-ui.tr-searchbar .tr-location-option:focus,
.tr-ui.tr-searchbar .tr-location-option.is-active,
.tr-ui.tr-searchbar .tr-location-option[aria-selected="true"] {
    outline: none;
    background: color-mix(in srgb, var(--tr-secondary) 6%, transparent);
}

@media (max-width: 980px) {
    .tr-ui.tr-searchbar .tr-searchbar__form {
        align-items: stretch;
    }

    .tr-ui.tr-searchbar .tr-searchbar__form > .tr-control {
        flex: 1 1 100%;
        width: 100%;
    }

    .tr-ui.tr-searchbar .tr-searchbar__actions {
        margin-left: 0;
        flex: 1 1 100%;
        width: 100%;
    }

    .tr-ui.tr-searchbar .tr-searchbar__form > .tr-control .tr-input,
    .tr-ui.tr-searchbar .tr-searchbar__form > .tr-control .tr-select,
    .tr-ui.tr-searchbar .tr-searchbar__actions .tr-button {
        width: 100%;
    }
}
