/* WooCommerce Booking Search - Estilos principales */

.wc-booking-search-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Formulario de búsqueda - Diseño tipo "pill" */
.wc-booking-search-form {
    display: flex;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 0;
    gap: 0;
    align-items: stretch;
    position: relative;
    z-index: 10;
    border: 1px solid #e5e5e5;
    min-height: 60px;
}

/* Campos de búsqueda */
.search-field {
    flex: 1;
    position: relative;
    padding: 14px 20px; /* baja 2px para igualar altura con viajeros */
    border-right: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 64px;
    height: 64px; /* altura fija para evitar saltos al hacer clic */
    box-sizing: border-box;
}

.search-field:last-of-type {
    border-right: none;
}

.search-field label {
    display: block;
    font-weight: 700;
    color: #333;
    font-size: 11px;
    margin-bottom: 4px; /* margen constante, altura contenida por height fijo */
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
}

.search-field input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
    background: transparent;
    padding: 0!important;
    font-weight: 400!important;
    line-height: 1.2;
    cursor: pointer;
    border:0px!important;
}

/* Evitar cambio de estilo cuando el campo tiene foco/valor */
.search-field.is-active input,
.search-field input:not(:placeholder-shown) {
    font-weight: 400;
}

.search-field input::placeholder {
    color: #999;
    font-size: 14px;
    font-weight: 400;
}

.search-field input:focus {
    outline: none;
}

.search-field input[readonly] {
    cursor: pointer;
}

/* Estilos específicos para campos con valores */
.search-field input:not(:placeholder-shown) {
    color: #333;
    font-weight: 400; /* evitar salto visual al cambiar de placeholder a valor */
}

.search-field input[readonly]:not(:placeholder-shown) {
    color: #333;
    font-weight: 400; /* mismo peso que placeholder */
}

/* Campo de destino con sugerencias */
.destination-field {
    position: relative;
}

.destination-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 8px;
}

.destination-suggestion {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    font-size: 14px;
}

.destination-suggestion:hover {
    background-color: #f8f9fa;
}

.destination-suggestion:last-child {
    border-bottom: none;
}

/* Selector de viajeros */
.travelers-field {
    position: relative;
}

.travelers-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    display: none;
    padding: 20px;
    min-width: 320px;
    margin-top: 8px;
}

.traveler-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.traveler-category:last-child {
    border-bottom: none;
}

.category-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.category-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.service-animal-link {
    color: #007bff;
    text-decoration: underline;
    font-size: 12px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: all 0.2s;
    font-weight: 300;
}

.quantity-btn:hover:not(:disabled) {
    border-color: #333;
    color: #333;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity {
    font-size: 16px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* Botón de búsqueda - Diseño circular */
.search-button {
    background: #8A2E5E;
    border: none;
    border-radius: 30px;
    width: 120px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin: 8px;
    box-shadow: 0 2px 8px rgba(138, 46, 94, 0.3);
}

.search-button:hover {
    background: #6d2449;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(138, 46, 94, 0.4);
}

.search-button svg {
    width: 20px;
    height: 20px;
}

/* Dropdown de selector de fechas */
.date-picker-dropdown {
    position: fixed;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    display: none;
    min-width: 680px;
    max-width: 820px;
    padding: 0;
    overflow: hidden;
}

.date-picker-dropdown.show {
    display: block !important;
}

/* Posicionar el dropdown de fechas */
.check-in-field, .check-out-field {
    position: relative;
}

/* Eliminadas pestañas y botones de modo */

.date-picker-body {
    padding: 0 0 20px 0;
}

/* Calendario */
.calendar-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 12px 24px 0 24px;
    padding: 0;
}

.calendar {
    width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

.calendar-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-transform: capitalize;
}

.calendar-nav {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav:hover {
    background: #f0f0f0;
    color: #333;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    padding: 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
    position: relative;
    min-height: 40px;
}

.calendar-day.available {
    color: #333;
    cursor: pointer;
}

.calendar-day.available:hover {
    background: #f8f9fa;
    border-color: #e5e5e5;
}

.calendar-day.unavailable {
    color: #ccc;
    cursor: not-allowed;
}

.calendar-day.selected {
    background: #8A2E5E;
    color: white;
    border-color: #8A2E5E;
}

.calendar-day.in-range {
    background: #f4e6f0;
    color: #333;
    border-color: #f4e6f0;
}

.calendar-day.range-start {
    background: #8A2E5E;
    color: white;
    border-color: #8A2E5E;
}

.calendar-day.range-end {
    background: #8A2E5E;
    color: white;
    border-color: #8A2E5E;
}

/* Opciones de flexibilidad de fechas */
/* Eliminadas opciones de flexibilidad */

/* Resultados de búsqueda */
.search-results {
    margin-top: 30px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.result-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.result-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    position: relative;
}

.result-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.result-content {
    padding: 15px;
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.result-details {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px 0;
}

.result-price {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Estados de carga */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-booking-search-form {
        flex-direction: column;
        border-radius: 16px;
        padding: 20px;
        gap: 20px;
        min-height: auto;
    }
    
    .search-field {
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        padding: 0 0 20px 0;
        min-height: auto;
    }
    
    .search-field:last-of-type {
        border-bottom: none;
    }
    
    .search-button {
        width: 100%;
        height: 50px;
        border-radius: 25px;
        margin-top: 10px;
    }
    
    .calendar-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.destination-suggestions,
.travelers-dropdown {
    animation: fadeIn 0.2s ease-out;
}

/* Utilidades */
.hidden {
    display: none !important;
}

.active {
    display: block !important;
}