/**
 * jQuery Components Styles
 * Styles that were previously scoped in Vue components
 * Now need to be global for jQuery implementation
 */

/* LocationSearch Component */
.location-search-input {
    width: 100%;
    height: 30px;
    color: #000000 !important;
    border: 0 !important;
    outline: none !important;
    line-height: 30px;
    font-size: .9rem;
    text-align: left;
    font-family: "Gotham Medium", sans-serif;
    -webkit-user-select: text;
    user-select: text;
    -webkit-tap-highlight-color: transparent;
}

.location-search-input.placeholder {
    color: #5a5a5a !important;
}

.location-search-input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove contenteditable outline */
.location-search-input:focus-visible {
    outline: none !important;
}

@media screen and (max-width: 767px) {
    .filter-results-container {
        min-width: 19.5rem;
    }
}

/* ResultsPageSearch Component */

/* Filter counter badge - positioned absolutely on the filters button */
.search-bar-content .filters-button {
    position: relative;
}

.search-bar-content .filters-button .filter-counter {
    position: absolute;
    top: -7px;
    right: -7px;
}

/* Hide search icon on desktop (Vue used #searchButtonText targeting) */
.desktop-bar .search-btn .search-button-icon {
    display: none;
}

@media screen and (min-width: 768px) {
    .filters-button-container {
        flex: 1.2;
    }
}

@media screen and (max-width: 767px) {
    .main-components {
        gap: 6px;
    }

    /* Higher specificity needed to override form .btn { width: 100% } in main.css */
    #submitSearch,
    .button-flex .btn.search-btn {
        width: 48px;
        height: 48px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .button-flex {
        flex: none;
    }

    /* Match Vue's display: block for the search icon on mobile */
    .search-bar .search-btn .search-button-icon {
        display: block;
        margin-top: 2px;
    }
}

/* PropertyTypeDropdown Component */
.property-type-dropdown .form-check {
    margin-bottom: 0.5rem;
}

.search-outline span {
    pointer-events: none;
}

/* Re-enable pointer events for location search input and tags (overrides .search-outline span rule) */
.location-search-wrapper .location-search,
.location-search-wrapper .location-tags-container,
.location-search-wrapper .location-search-input,
.location-search-wrapper .location-tag,
.location-search-wrapper .location-tag span,
.location-search-wrapper .location-tag i {
    pointer-events: auto;
}

#propertySearchDesktop .filters-button.setBorder {
    border-color: #c1c1c1;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#propertySearchDesktop .filters-button.setBorder i {
    font-size: 0.85rem;
    line-height: 1rem;
}

#propertySearchDesktop .filters-button span.filters-label {
    font-size: 0.95rem;
}

.type-icon {
    line-height: 1;
}

.property-type-dropdown .dropdown-menu {
    min-width: 11.5rem;
}

@media screen and (max-width: 767px) {
    .no-show {
        display: none !important;
    }

    #propertySearchDesktop .filters-button img {
        max-width: 22px;
    }
}

/* PropertyTypeDropdown - Homepage Border Fix */
.home-search .property-type-dropdown .filters-button {
    border: 2px solid #c1c1c1 !important;
    border-radius: var(--property-border-radius);
}

/* PriceDropdown Component */
.search-bar-content .desktop-bar .priceFilter {
    min-width: 18rem;
}

/* BedroomsDropdown Component */
.bedroom-filter-dropdown .search-outline span {
    pointer-events: none;
}

/* DevelopmentSearch Component */
#searchNewDevelopments .search-btn {
    height: 3rem;
}

#searchNewDevelopments .form-control.temp {
    height: 2.75rem;
}

#searchNewDevelopments .temp {
    border-radius: var(--property-border-radius);
    border: 2px solid #c1c1c1;
}

#searchNewDevelopments .mobi-button {
    border-radius: var(--property-border-radius);
    font-family: 'Gotham Medium', sans-serif;
}

#searchNewDevelopments .filter-icon:hover {
    cursor: pointer;
}

#searchNewDevelopments .mobi-button.search-btn {
    background: #1C5FE9;
    border: none;
}

@media screen and (max-width: 767px) {
    #searchNewDevelopments .temp-button {
        background: transparent;
        border: 2px solid #c1c1c1;
        color: #000 !important;
        border-radius: var(--property-border-radius);
        width: 48px;
        height: 48px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        float: right;
    }

    #searchNewDevelopments .mobi-button.search-btn {
        width: 100%;
        height: 3rem;
        float: none;
    }

    #searchNewDevelopments .mobi-button.search-btn .dot {
        background: #fff;
    }

    /* Show search icon on mobile for development search */
    #searchNewDevelopments .search-btn .search-button-icon {
        display: block;
    }
}
