/* Vacation Calendar Styles con Filtri e Dropdown */

.vacation-calendar-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

/* Filtri */
.vacation-filters {
    background: #f8f9fa;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.vacation-filters h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.3em;
}

.filter-grid {
    display: grid;
    grid-template-columns: 16% 12% 12% 12% 10% 9% 9% 12%;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.85em;
}

.filter-item select {
    width: 100%;
    padding: 5px 10px;
    border: 1px solid #666;
    border-radius: 6px;
    font-size: 0.9em;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-item select:hover,
.filter-item select:focus {
    border-color: #4CAF50;
    outline: none;
}

/* Filtro Date con Dropdown */
.filter-dates {
    position: relative;
}

.date-input-wrapper {
    position: relative;
}

.date-range-input {
    width: 100%;
    padding: 5px 40px 5px 12px!important;
    border: 2px solid #ddd;
    border-radius: 6px!important;
    font-size: 0.9em;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.date-range-input:hover,
.date-range-input:focus {
    border-color: #4CAF50;
    outline: none;
}

.date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    cursor: pointer;
    pointer-events: none;
}

/* Dropdown Calendario */
.calendar-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 20px;
    pointer-events: auto !important;
    min-width: 720px;
}

.calendar-dropdown * {
    pointer-events: auto !important;
}

.calendar-dropdown-content {
    width: 100%;
    pointer-events: auto !important;
}

.calendar-dual-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.calendar-month-wrapper {
    min-width: 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.calendar-title {
    margin: 0;
    font-size: 1.3em;
    color: #333;
    font-weight: 600;
}

.calendar-nav {
    background: #4CAF50;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

.calendar-nav:hover {
    background: #45a049;
    transform: scale(1.1);
}

.calendar-spacer {
    width: 40px;
    height: 40px;
    display: inline-block;
}

.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-day-name {
    text-align: center;
    font-weight: 600;
    padding: 10px 5px;
    color: #666;
    font-size: 0.95em;
}

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    background: white;
    font-size: 0.9em;
    pointer-events: auto !important;
    position: relative;
    z-index: 5;
    min-height: 45px;
}

.calendar-day:not(.past):not(.empty):hover {
    background: #e8f5e9;
    border-color: #59888E;
    transform: scale(1.05);
}

.calendar-day.selected {
    background: #59888E;
    color: white;
    border-color: #59888E;
}

.calendar-day.past {
    color: #ccc;
    cursor: not-allowed;
    background: #fafafa;
}

.calendar-day.empty {
    border: none;
    cursor: default;
}

.calendar-dropdown-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn-cancel-dates,
.btn-confirm-dates {
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1em;
}

.btn-cancel-dates {
    background: #f5f5f5;
    color: #666;
}

.btn-cancel-dates:hover {
    background: #e0e0e0;
}

.btn-confirm-dates {
    background: #4CAF50;
    color: white;
}

.btn-confirm-dates:hover {
    background: #45a049;
}

/* Pulsante Azioni */
.filter-actions {
    text-align: center;
    margin-top: 21px;
}

.search-houses-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 5px 20px;
    font-size: 0.9em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.search-houses-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.search-houses-btn.filters-changed {
    background: #FF9800;
    animation: pulse 1s ease-in-out;
}

.search-houses-btn.filters-changed:hover {
    background: #F57C00;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.search-houses-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Container Risultati */
.vacation-results-wrapper {
    margin: 40px;
}

#vacation-results-container {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 25px;
}

/* Badge tipo struttura */
.house-type-badge {
    margin-bottom: 10px;
}

.type-badge {
    display: inline-block;
    background: #A9A33A;
    color: white;
    padding: 4px 12px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 400;
    margin-right: 5px;
	text-transform: uppercase;
}

/* Modal - Rimosso, non più necessario */

/* Card casa */
.vacation-house-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    background: white;
}

.vacation-house-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.vacation-house-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.house-card-content {
    padding: 20px;
}

.house-card-content h3 {
    margin: 0 0 15px 0;
    color: #59888E;
    font-size: 1.3em;
}

.house-features,
.house-distances {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.house-features span {
    background: #f5f5f5;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.8em;
    color: #666;
}

.house-distances span {
    background: #e3f2fd;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.8em;
    color: #1565c0;
    font-weight: 500;
}

.house-price {
    font-size: 1.3em;
    font-weight: bold;
    color: #4CAF50;
    margin: 15px 0;
}

.house-link {
    display: inline-block;
    color: #A9A33A;
    text-decoration: uppercase;
    transition: all 0.3s;
    font-weight: 600;
}

.house-link:hover {
    text-decoration: underline;
    transform: translateX(5px);
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        right: auto;
        width: 90%;
        max-width: 350px;
        min-width: auto;
    }
    
    .calendar-dual-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calendar-month-wrapper:last-child {
        display: none;
    }
    
    .search-houses-btn {
        padding: 12px 30px;
        font-size: 1em;
    }
    
    #vacation-results-container {
        grid-template-columns: 1fr;
    }
    
    .vacation-modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .vacation-filters {
        padding: 15px;
    }
    
    .vacation-filters h3 {
        font-size: 1.1em;
    }
    
    .calendar-days-header {
        gap: 2px;
    }
    
    .calendar-days {
        gap: 2px;
    }
    
    .calendar-day-name {
        font-size: 0.75em;
        padding: 5px 2px;
    }
    
    .calendar-day {
        font-size: 0.85em;
    }
    
    .house-card-content {
        padding: 15px;
    }
    
    .house-card-content h3 {
        font-size: 1.1em;
    }
}