/*
| Home Search Bar Styles
| Matches design: Sleek horizontal pill search bar on desktop,
| fully responsive card on mobile/tablet.
*/

.home-search-wrapper {
    width: 100%;
}

.home-search-bar {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #e5e0d8;
    box-shadow: 0 4px 20px -2px rgba(33, 29, 26, 0.07);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-search-bar:focus-within {
    box-shadow: 0 8px 30px -4px rgba(33, 29, 26, 0.12);
    border-color: #d1c7b8;
}

.home-search-divider {
    height: 32px;
    width: 1px;
    background-color: #e5e0d8;
    flex-shrink: 0;
    align-self: center;
}

.home-search-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b645c;
    line-height: 1.1;
    margin-bottom: 3px;
    display: block;
    white-space: nowrap;
}

.home-search-input-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
}

.home-search-input {
    width: 100%;
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text, #211d1a);
    outline: none !important;
    box-shadow: none !important;
}

.home-search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.home-search-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.home-search-select {
    width: 100%;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    padding: 0 18px 0 0 !important;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text, #211d1a);
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.home-search-chevron {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 14px;
    height: 14px;
    color: #6b645c;
}

.home-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 24px;
    border-radius: 9999px;
    color: #ffffff;
    background-color: var(--color-primary, #c1432b);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    border: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.home-search-btn:hover {
    background-color: var(--color-primary-deep, #a4361f);
    transform: scale(1.02);
    box-shadow: 0 6px 18px -2px rgba(193, 67, 43, 0.4);
}

/* Mobile & Tablet Styles (< 1024px) */
@media (max-width: 1023px) {
    .home-search-bar {
        border-radius: 1.5rem;
        padding: 1.25rem;
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
    }

    .home-search-section {
        padding: 0.35rem 0.25rem;
        border-bottom: 1px solid #f2ede7;
    }

    .home-search-section:last-of-type {
        border-bottom: none;
    }

    .home-search-grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .home-search-divider {
        display: none;
    }

    .home-search-btn-wrapper {
        width: 100%;
        padding-top: 0.35rem;
    }

    .home-search-btn {
        width: 100%;
        height: 48px;
    }
}

/* Desktop Single-Row Pill Styles (>= 1024px) */
@media (min-width: 1024px) {
    .home-search-bar {
        border-radius: 9999px;
        height: 72px;
        padding: 0 0.5rem 0 1.5rem;
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .home-search-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 0.75rem;
        height: 100%;
        min-width: 0;
    }

    .home-search-section.home-search-keyword {
        flex: 1.6;
        padding-left: 0.25rem;
    }

    .home-search-section.home-search-community {
        flex: 1.15;
    }

    .home-search-section.home-search-price {
        flex: 1.45;
    }

    .home-search-section.home-search-beds-baths {
        flex: 1.15;
    }

    .home-search-section.home-search-status {
        flex: 1.2;
    }

    .home-search-grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        width: 100%;
    }

    .home-search-btn-wrapper {
        padding-left: 0.5rem;
        padding-right: 0.25rem;
        display: flex;
        align-items: center;
        margin-left: auto;
    }
}

@media (min-width: 1280px) {
    .home-search-bar {
        padding: 0 0.6rem 0 1.75rem;
    }

    .home-search-section {
        padding: 0 1rem;
    }

    .home-search-section.home-search-keyword {
        padding-left: 0.5rem;
    }
}
