/* 
Theme Name: Stilverso Theme Child
Theme URI: https://github.com/elementor/hello-theme/
Description: Stilverso Theme Child è un tema basato su Hello Elementor, personalizzato dal team di Stilverso Full Digital Agency
Author: Stilverso Full Digital Agency
Author URI: https://www.stilverso.it/
Template: hello-elementor
Version: 1.0.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/*
    Add your custom styles here
*/

/* === CALENDARIO VACANZE === */

/* Contenitore principale */
.vacation-calendar,
.vacation-filter-calendar {
    max-width: 500px;
    margin: 0 auto 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

/* Header calendario */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
    text-transform: capitalize;
}

.calendar-header button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.calendar-header button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.calendar-header button:active {
    transform: translateY(0);
}

/* Griglia calendario */
.calendar-grid {
    padding: 0;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.weekday {
    text-align: center;
    font-weight: 600;
    padding: 12px 4px;
    font-size: 0.85em;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: white;
}

/* Giorni calendario */
.calendar-day {
    min-height: 70px;
    border: 1px solid #e9ecef;
    border-width: 0 1px 1px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

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

.calendar-day.past {
    background: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
}

.calendar-day.available {
    background: #f8fff8;
    border-color: #d4edda;
}

.calendar-day.available:hover {
    background: #e8f5e8;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.calendar-day.occupied {
    background: #fff5f5;
    border-color: #f5c6cb;
    cursor: not-allowed;
}

.calendar-day.occupied:hover {
    background: #ffebee;
}

/* Numeri e prezzi giorni */
.day-number {
    font-weight: 600;
    font-size: 1em;
    margin-bottom: 2px;
}

.day-price {
    font-size: 0.75em;
    color: #28a745;
    font-weight: 600;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
}

/* Stati selezione */
.calendar-day.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: #667eea !important;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.calendar-day.filter-selected {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
    color: white !important;
    border-color: #ff9800 !important;
    transform: scale(1.02);
}

/* Stili range */
.calendar-day.range-start {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%) !important;
    color: white !important;
    border-color: #2196f3 !important;
    border-radius: 50% 0 0 50%;
}

.calendar-day.range-end {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%) !important;
    color: white !important;
    border-color: #2196f3 !important;
    border-radius: 0 50% 50% 0;
}

.calendar-day.range-middle {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%) !important;
    color: #1976d2 !important;
    border-color: #2196f3 !important;
}

/* Legenda */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #495057;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid transparent;
}

.legend-color.available {
    background: linear-gradient(135deg, #f8fff8 0%, #e8f5e8 100%);
    border-color: #d4edda;
}

.legend-color.occupied {
    background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
    border-color: #f5c6cb;
}

/* === CONTROLLI FILTRO === */

.filter-controls {
    margin-bottom: 20px;
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-controls button {
    margin: 5px 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-filter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.toggle-filter.active {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.toggle-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.toggle-range {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.clear-selection {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.search-availability {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    font-size: 1em;
    padding: 15px 30px;
}

.search-availability:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* === DATE SELEZIONATE === */

#selected-dates-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

#selected-dates-container h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-weight: 600;
}

#range-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #2196f3;
}

.range-status {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 1px solid #ff9800;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #ff9800;
}

.selection-summary {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
    border-left: 4px solid #4caf50;
}

.date-range-display {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border: 1px solid #9c27b0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border-left: 4px solid #9c27b0;
}

.selected-date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.selected-date-item:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.remove-date,
.remove-all-dates {
    background: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s ease;
}

.remove-date:hover,
.remove-all-dates:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

/* === RISULTATI RICERCA === */

.search-results {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    display: none;
    overflow-y: auto;
}

.results-content {
    background: white;
    max-width: 1200px;
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
}

.results-header h3 {
    margin: 0;
    font-size: 1.5em;
}

.close-results {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.2s ease;
}

.close-results:hover {
    background: rgba(255,255,255,0.3);
}

.results-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Griglia case disponibili */
.available-houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.house-result-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.house-result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.house-thumbnail {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.house-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.house-result-card:hover .house-thumbnail img {
    transform: scale(1.05);
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-size: 3em;
    color: #adb5bd;
}

.house-info {
    padding: 20px;
}

.house-info h4 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #495057;
}

.house-info h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.house-info h4 a:hover {
    color: #667eea;
}

.house-details {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    color: #6c757d;
    font-size: 0.9em;
}

.house-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    font-weight: 600;
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.price-per-night {
    color: #495057;
}

.total-price {
    color: #28a745;
    font-size: 1.1em;
}

.house-excerpt {
    margin: 15px 0;
    color: #6c757d;
    line-height: 1.5;
}

.view-house-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 25px;
    margin-top: 15px;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
}