#belts-search-widget {
    width: 90%;
    max-height: 120vh;
    overflow-y: auto;
    padding: 15px;
    box-sizing: border-box;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#belts-search-widget fieldset {
    margin-bottom: 1em;
    border: 1px solid #ccc;
    padding: 10px;
    box-sizing: border-box;
}

#belts-search-widget legend {
    font-weight: bold;
    font-size: 0.9em;
    background-color: #018345;
    border-radius: 8px 8px 8px 8px;
    color: #FFFFFF;
    padding: 4px 8px;
    margin-bottom: 5px;
    cursor: pointer;
}

#belts-search-widget label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5em;
    cursor: pointer;
}

#belts-search-widget input[type="checkbox"] {
    margin-right: 10px;
}

#belts-search-widget button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 0.5em 1em;
    cursor: pointer;
    width: 100%;
    border-radius: 5px;
}

#belts-search-widget input[type="range"] {
    width: calc(100% - 10px);
    margin: 5px;
}

.belts-search-filter {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #fff;
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    background: gray;
}

.primary-nav {
    align-items: center;
    height: 50px;
    left: 0px;
    padding: 15px;
    width: 100%;
    margin: 0px;
    background-color: darkgray;
    display: inline;
    position: fixed;
    top: 70px;
    z-index: 3;
    font-weight: bold;
}

#search-container {
    margin: 0px 10px 15px 0px;
    align-items: center;
    width: 90%;
    max-width: 500px;
    justify-content: left;
}

form .no-submit {
    width: 180px;
    align-items: center;
    color: white;
    right: 0;
    display: flex;
    padding: 2px;
    border: 1px solid currentColor;
    border-radius: 5px;
    margin: 0 0;
}

input[type="search"] {
    border: none;
    background-color: transparent;
    margin: 0;
    padding: 7px 8px 7px 30px;
    font-size: 16px;
    color: inherit;
    border: 1px solid black;
    border-radius: inherit;
}

input[type="search"]::placeholder {
    color: white;
}

input[type="search"]:focus {
    box-shadow: 0 0 3px 0 #3f69a8;
    border-color: #3f69a8;
    outline: none;
}

.belts-search-widget fieldset legend {
    font-size: 14px;
    font-weight: bold !important;
    color: #008345;
    padding: 8px 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid #0073aa;
    text-transform: uppercase;
}

.fabrication-type_filter_box.asp_sett_scroll,
.fabrication_color_filter_box.asp_sett_scroll {
    max-height: none !important;
    overflow: visible !important;
}

.fabrication-type_filter_box,
.fabrication_color_filter_box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.fabrication-type_filter_box .asp_option,
.fabrication_color_filter_box .asp_option {
    display: flex;
    align-items: center;
}

fieldset legend {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    color: #008345;
    background-color: #FFFFFF;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold !important;
    color: #008345;
    padding: 8px 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid #0073aa;
    text-transform: uppercase;
}

fieldset legend::after {
    content: "▼";
    font-size: 14px;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

fieldset.open legend::after {
    transform: rotate(180deg);
}

fieldset.slider-filter legend::after {
    content: none;
}

fieldset .fabrication-type_filter_box,
#custom-dropdown {
    position: relative;
    width: 430px;
    font-family: Nunito Sans;
}

#typeahead-input {
    width: 80%;
    padding: 10px;
    margin-bottom: 5px;
    border: 1px solid #ccc;
}

#dropdown-options {
    display: none;
    flex-direction: column;
    position: absolute;
    width: 80%;
    background: white;
    border: 1px solid #ccc;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
}

.dropdown-option:hover {
    background-color: #f0f0f0;
}

.part-number {
    background-color: #e0e0e0;
    padding: 2px 5px;
    border-radius: 4px;
    margin-right: 10px;
    white-space: nowrap;
}

.description {
    background-color: transparent;
}

.range-slider {
    margin: 20px 0;
}

.range-slider {
    margin: 20px auto;
    height: 300px;
    width: 80%px;
}

.slider-values span {
    color: #018345;
    font-weight: bold;
    margin: 0 5px;
}

.noUi-target {
    background: #ccc;
    border-radius: 5px;
    height: 6px;
}

.noUi-connect {
    background: #018345;
}

.noUi-handle {
    width: 8px;
    height: 10px;
    background: #018345;
    border: 2px solid #e3e2ad;
    cursor: pointer;
}

.status-container {
    display: flex;
    justify-content: center;
}

.status-text {
    text-align: center;
    font-size: 0.9em;
    font-weight: 500;
    color: #830137;
}

.noUi-tooltip {
    display: none;
}

.noUi-active .noUi-tooltip {
    display: block;
}

.slider-values {
    display: flex;
    color: #018345;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.slider-values > * {
    margin: 0 5px;
}

#search-status-popup {
    display: none;
    text-align: center;
}

.loader {
    border: 6px solid #ccc;
    border-top: 6px solid #0073aa;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.accordion-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.accordion-controls img {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.accordion-controls img:hover {
    opacity: 0.7;
}

fieldset.slider-filter {
    height: 175px;
    padding-left: 15px;
    padding-right: 15px;
}

fieldset.slider-filter legend {
    padding-left: 10px;
    padding-right: 10px;
    pointer-events: none;
    cursor: default;
}

fieldset {
    overflow: hidden;
}

fieldset:not(.slider-filter) > *:not(legend, .status-text) {
    display: none;
}

fieldset.open > *:not(legend, .status-text) {
    display: block;
}

#reset-search {
    background-color: #d9534f;
}

fieldset.slider-filter legend {
    pointer-events: none;
    cursor: default;
}

fieldset {
    overflow: hidden;
}

fieldset:not(.slider-filter) > *:not(legend, .status-text) {
    display: none;
}

fieldset.open > *:not(legend, .status-text) {
    display: block;
}

.search-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.search-controls button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: 0.3s;
}

.search-controls button:hover {
    background-color: #005f8c;
}

.search-controls img {
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.search-controls img:hover {
    opacity: 0.7;
}

.noUi-pips {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.noUi-value {
    font-size: 12px;
    color: #018345;
    margin-top: 5px;
}

fieldset.slider-filter {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.belts-loop-grid {
    min-height: 300px;
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.e-looop-noting-found-message {
    background-color: blanchedalmond;
    font-size: 50px;
    font-weight: 500;
}

#general-search-fieldset {
    display: block !important;
    visibility: visible !important;
}

#general_search {
    padding-left: 30px;
    background-repeat: no-repeat;
    background-position: 5px center;
    background-size: 20px;
}

.hidden {
    display: none;
}

.search-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.search-modal-content {
    position: absolute;
    background: white;
    font-family: Arial, sans-serif;
    top: 10%;
    left: 50%;
    transform: translate(-50%, 0);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 80%;
}

.search-modal-overlay.visible {
    display: flex;
}

#search-summary {
    list-style-type: none;
    padding: 0;
}

#search-summary ul {
    margin: 5px 0 10px 25px;
    padding-left: 0;
}

.search-summary-inline {
    display: block;
    margin-left: 25px;
}

.search-modal-content h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.search-modal-content ul {
    list-style-type: none;
    padding: 0;
    text-align: left;
}

.search-modal-content ul li {
    margin-bottom: 5px;
}

.no-results-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.no-results-modal-overlay.visible {
    display: flex;
}

.no-results-modal-content {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, 0);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 80%;
    text-align: center;
}

.no-results-modal-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
}

.no-results-modal-button:hover {
    background: #0056b3;
}

/* Mobile-specific styles */
@media only screen and (max-width: 768px) {
    #belts-search-widget {
        width: 100%;
        max-height: none;
        padding: 10px;
        border: none;
        background-color: transparent;
    }

    #general-search-fieldset {
        border: none;
        padding: 0;
        margin-bottom: 10px;
    }

    #general-search-fieldset legend {
        display: none; /* Hide the legend on mobile */
    }

    #general_search {
        width: 100%;
        padding: 10px 10px 10px 40px;
        font-size: 16px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-position: 10px center;
        background-size: 24px;
    }

    .search-controls {
        flex-direction: row;
        gap: 10px;
        margin: 10px 0;
    }

    .search-controls button {
        width: auto;
        padding: 10px 20px;
        font-size: 14px;
    }

    #search-button {
        background-color: #0073aa;
    }

    #reset-search {
        background-color: #d9534f;
    }

    .belts-loop-grid {
        min-height: auto;
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
}
