/**
 * SortBy Filter Theme Update
 * Matches the new design with white background and improved typography
 */

/* Listing content title styling */
.listing__content--title {
    font-size: 16px !important;
}

/* Override dropdown box styles for SortBy filter */
.listing-sort__wrapper .dropdown__box {
    background-color: #FFFFFF !important;
    border-radius: 8px !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    padding: 8px 1.5rem !important;
    min-width: 230px;
}

/* Remove the dark background override */
.listing-sort__wrapper .dropdown__box {
    --tw-bg-opacity: 1 !important;
}

/* Update label styles to match new design */
.listing-sort__item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #F3F4F6;
    transition: all 0.2s ease;
    margin: 0 -1rem;
}

.listing-sort__item:last-child {
    border-bottom: none;
}

.listing-sort__item label {
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 24px !important;
    color: #262626 !important;
    display: block;
    width: 100%;
    padding: 0;
    text-align: center;
    transition: all 0.2s ease;
}

/* Hover state */
.listing-sort__item:hover {
    background-color: #F9FAFB;
    border-radius: 0;
}

/* Checked/Selected state */
.listing-sort__item input:checked + label {
    font-weight: 400 !important;
    color: #262626 !important;
}

.listing-sort__item:has(input:checked) {
    background-color: #F2F2F2 !important;
    border-radius: 4px;
}

/* Hide radio buttons but keep them functional */
.listing-sort__item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Responsive adjustments */
@media (min-width: 1024px) {
    .listing-sort__wrapper .dropdown__box {
        padding: 8px 1.75rem !important;
    }

    .listing-sort__item label {
        font-size: 16px !important;
        line-height: 24px !important;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .listing-sort__wrapper .dropdown__box {
        min-width: 240px;
        padding: 8px 1rem !important;
    }

    .listing-sort__item label {
        font-size: 14px !important;
        line-height: 24px !important;
    }
}
