/* Search Form Container */
.search__container, .search-form__container {
    overflow: visible;
}

.search-form {
    width: 100%;
    margin-bottom: 2rem;
}

.search-form__wrapper {
    display: flex;
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    gap: 1rem;
    align-items: center;
}

/* Input Groups */
.search-form__group {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0; /* Prevent flex items from overflowing */
}

.search-form__input-container {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Calendar specific */
.search-form__group:last-child {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 600px; /* Limitar ancho máximo del grupo */
}

.ui-widget-header {
    height: 48px;
    width: 100%;
    min-width: 250px; /* Ancho mínimo para mantener legibilidad */
    padding: 0.75rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 16px;
}

/* Icons */
.search-form__icon {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    color: #666;
}

/* Inputs */
.search-form__input {
    width: 100%;
    height: 48px;
    padding: 0.75rem 0.75rem 0.75rem 0.75rem;
    border: none;
    font-size: 1rem;
    background: transparent;
}

.search-form__input:focus {
    outline: none;
}

/* Results Dropdown - Base styles */
.search-form__results {
    display: none; /* Hide by default */
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-height: 300px;
    overflow-y: auto;
}

.search-form__results:not(:empty) {
    display: block;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .search-form__group {
        position: relative; /* Ensure relative positioning for mobile */
    }

    .search-form__results {
        position: absolute; /* Keep consistent with desktop */
        left: 0;
        right: 0;
        margin: 5px 0; /* Adjust margins */
        width: 100%; /* Control width */
        max-width: 100%; /* Prevent overflow */
    }
}

/* Search Results Content */
.country-group {
    border-bottom: 1px solid #eee;
}

.country-group:last-child {
    border-bottom: none;
}

.country-group__title {
    padding: 8px 16px;
    font-weight: 600;
    color: #666;
    background: #f8f9fa;
}

.location-item {
    padding: 10px 16px;
    cursor: pointer;
}

.location-item:hover {
    background-color: #00beda;
}

/* Button */
.search-form__button {
    background-color: #ffd700;
    color: #333;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    height: 48px;
    font-weight: 500;
    min-width: 150px;
    white-space: nowrap;
}

.search-form__button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Estilos específicos para el datepicker */
.ui-datepicker {
    font-size: 14px;
    min-width: 300px;
    max-width: 350px;
}

.ui-datepicker td {
    padding: 1px;
}

.ui-datepicker td span, 
.ui-datepicker td a {
    width: 30px; /* Ancho fijo para días */
    height: 30px; /* Alto fijo para días */
    text-align: center;
    padding: 0;
    border-radius: 50%; /* Forma circular */
}

/* Responsive (no more tablet) */
@media (max-width: 991px) {
    .search-form__wrapper {
        flex-direction: column;
    }

    .search-form__group {
        width: 100%;
        max-width: 600px;
    }

    .search-form__group:last-child {
        flex-direction: column;
        gap: 1rem;
    }

    .ui-widget-header {
        max-width: none;
        width: 100%;
    }

    .search-form__results {
        position: fixed;
        top: auto;
        left: 1rem;
        right: 1rem;
        width: calc(100% - 2rem); /* Control width accounting for margins */
    }

    .search-form__button {
        width: 100%;
    }

    .search-form__input-container {
        width: 100%;
    }
}
