.csb_root {
    display: flex;
    width: 100%;
}

.csb_form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.csb_bar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    background-color: var(--primarycolor);
    padding: 10px;
    box-sizing: border-box;
}

.csb_field {
    position: relative;
    display: flex;
}

.csb_field_city {
    flex: 1 1 240px;
}

.csb_city_input,
.csb_radius_select {
    border: none;
    border-radius: 4px;
    outline: none;
    padding: 9px 12px;
    font-size: medium;
    box-sizing: border-box;
}

.csb_city_input {
    width: 100%;
    padding-right: 34px;
}

.csb_radius_select {
    background-color: white;
    color: #1c1c1c;
    cursor: pointer;
}

.csb_clear_btn {
    display: none;
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: none;
    color: #888;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.csb_clear_btn:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.06);
}

/* :placeholder-shown is only true when the input is empty, so this naturally
   only shows the clear button once a city name is actually in the box */
.csb_city_input:not(:placeholder-shown) ~ .csb_clear_btn {
    display: flex;
}

.csb_dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #fefefe;
    color: #1c1c1c;
    border-radius: 4px;
    box-shadow: 0 10px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    z-index: 1000;
    overflow: hidden;
}

.csb_status {
    display: none;
    padding: 12px 16px;
    font-size: small;
    color: #6b6b6b;
}

.csb_dropdown[data-state="searching"] .csb_status_searching {
    display: flex;
    align-items: center;
    gap: 8px;
}

.csb_dropdown[data-state="empty"] .csb_status_empty {
    display: block;
}

.csb_spinner {
    width: 12px;
    height: 12px;
    border: 2px solid #d8d8d8;
    border-top-color: var(--primarycolor);
    border-radius: 50%;
    display: inline-block;
    animation: csb_spin 0.7s linear infinite;
}

@keyframes csb_spin {
    to {
        transform: rotate(360deg);
    }
}

.csb_results {
    display: none;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 280px;
    overflow-y: auto;
}

.csb_dropdown[data-state="results"] .csb_results {
    display: block;
}

.csb_result_item {
    padding: 8px 16px;
    cursor: pointer;
    list-style-position: inside;
    list-style-type: circle;
}

.csb_result_item:hover {
    background-color: #ebebeb;
}

.csb_result_item.csb_hidden_item {
    display: none;
}

@media (max-width: 768px) {
    .csb_bar {
        flex-direction: column;
    }

    /* flex-basis: 240px was sized for the row layout's width; in the column
       layout above it's read as a height, which is what blew up the input box */
    .csb_field_city {
        flex: 1 1 auto;
    }
}
