/* Search section in hero area - with mobile optimizations */
.search-section {
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.search-form {
    width: 100%;
}

.search-input {
    height: 58px;
    font-size: 16px;
    border-radius: 4px 0 0 4px !important;
    padding-left: 15px;
    padding-right: 10px;
    -webkit-appearance: none; /* Fix for iOS */
    text-overflow: ellipsis;
}

.search-button {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    border-radius: 0 4px 4px 0 !important;
    white-space: nowrap;
}

.nearby-button {
    min-width: 160px; 
    max-width: 180px;
    height: 58px;
    white-space: nowrap;
    border-radius: 4px !important;
    padding: 0 15px;
    text-overflow: ellipsis;
    overflow: hidden;
    font-size: 0.95rem;
}

/* General mobile optimizations */
@media (max-width: 768px) {
    .search-section {
        padding: 0 15px;
    }
    
    .search-section .d-flex {
        flex-direction: column;
        width: 100%;
    }
    
    .search-input {
        height: 50px;
        font-size: 14px;
        width: 100% !important;
    }
    
    .input-group-xl {
        width: 100%;
        display: flex;
    }
    
    .search-button {
        padding: 0.5rem 1rem;
        height: 50px;
    }
    
    .nearby-button {
        width: 100%;
        max-width: none;
        margin-top: 10px;
        height: 50px;
        font-size: 1rem;
        padding: 0 15px;
    }
}

/* Landscape mode fixes */
@media (max-width: 991px) and (orientation: landscape) {
    .search-section .d-flex {
        flex-direction: row !important;
    }
    
    .search-form {
        flex: 1;
        margin-right: 10px;
    }
    
    .search-input {
        height: 48px;
        font-size: 15px !important;
        padding-right: 5px;
        text-overflow: ellipsis !important;
    }
    
    .search-button {
        min-width: 70px;
        height: 48px;
        padding: 0 10px;
    }
    
    .nearby-button {
        width: auto;
        min-width: 130px;
        max-width: 150px;
        height: 48px;
        margin-top: 0;
        white-space: nowrap;
        font-size: 0.9rem;
    }
}

/* Android-specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm) {
    .search-input {
        font-size: 16px !important; /* Prevent zoom on input focus */
        -webkit-tap-highlight-color: transparent;
        text-overflow: ellipsis !important;
        padding-right: 10px !important;
    }
    
    .input-group-xl {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
    }
    
    .search-button {
        min-width: 50px !important;
        white-space: nowrap !important;
        padding: 0 15px !important;
    }
    
    .nearby-button {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 15px !important;
        font-size: 1rem !important;
    }
}

/* Android landscape text visibility fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm) and (orientation: landscape) {
    .search-input {
        font-size: 14px !important;
        height: 45px !important;
        text-overflow: ellipsis !important;
    }
    
    .search-button {
        height: 45px !important;
        min-width: 45px !important;
        padding: 0 10px !important;
    }
    
    .nearby-button {
        height: 45px !important;
        min-width: 120px !important;
        max-width: 130px !important;
        font-size: 0.9rem !important;
    }
}