/* --- Stili Form di Noleggio --- */
.booking-form-wrapper {
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 30px 0;
}
.booking-form-wrapper h3 {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 25px;
}

#booking-form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Spazio tra i campi */
}

#booking-form .form-group {
    margin-bottom: 15px;
    flex: 1; /* Fa in modo che i campi riempiano lo spazio */
    min-width: 200px; /* Minimo ingombro per "a capo" */
}
#booking-form .form-group.full-width {
    width: 100%;
    flex-basis: 100%;
}
#booking-form .form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--dark-color);
}
#booking-form .form-group input[type="text"],
#booking-form .form-group input[type="email"],
#booking-form .form-group input[type="tel"],
#booking-form .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-family);
    box-sizing: border-box; /* Importante! */
}
#booking-form .form-group input.datepicker {
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-calendar' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E") no-repeat 97% center;
    cursor: pointer;
}

/* Stile per il Price Preview (Fase 4) */
#price-preview {
    width: 100%;
    padding: 20px;
    background: var(--light-color);
    border-radius: 5px;
    text-align: center;
    margin: 10px 0 20px 0;
    min-height: 50px;
}
#price-preview .price-label {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-color);
}
#price-preview .price-error {
    color: #a02c2c;
    font-weight: bold;
}

/* --- Stili Pagina Riepilogo Prenotazione --- */
.booking-summary {
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
}
.booking-summary h1 {
    color: var(--primary-color);
}

.summary-table {
    width: 100%;
    margin: 25px 0;
    border-collapse: collapse;
    text-align: left;
    font-size: 1.1rem;
}
.summary-table th, 
.summary-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}
.summary-table th {
    width: 35%;
    font-weight: bold;
    color: var(--dark-color);
    background: #fdfdfd;
}
.summary-table tr:last-child th,
.summary-table tr:last-child td {
    border-bottom: none;
}
.summary-table .total-row th,
.summary-table .total-row td {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    border-top: 2px solid var(--primary-color);
}

.payment-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--light-color);
    border-radius: 8px;
}

/* --- Stili Nuove Card Selezione Tenda --- */
.tent-selection-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

/* Gestione colonne automatica */
.tent-selection-grid.tent-count-1 { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto 30px auto; }
.tent-selection-grid.tent-count-2 { grid-template-columns: 1fr 1fr; }
.tent-selection-grid.tent-count-3 { grid-template-columns: 1fr 1fr 1fr; }

.tent-card {
    border: 2px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.tent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.tent-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(147, 138, 86, 0.4);
    transform: translateY(-5px);
}

.tent-card-image {
    position: relative;
    width: 100%;
    height: 180px; /* Altezza fissa per l'immagine */
}
.tent-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Non deforma l'immagine */
}
.availability-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: white;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.tent-card-content {
    padding: 15px;
    text-align: center;
}
.tent-card-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--dark-color);
}
.price-range {
    font-size: 0.9rem;
    color: var(--text-color);
}
.price-range strong {
    color: var(--primary-color);
}

.select-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(147, 138, 86, 0.9); /* Colore primario semi-trasparente */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    opacity: 0; /* Nascosto di default */
    transition: opacity 0.2s ease-in-out;
}
.tent-card.selected .select-overlay {
    opacity: 1; /* Mostra quando selezionato */
}

/* --- Stili Checkbox Termini --- */
.form-group-terms {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border-radius: 5px;
}
.form-group-terms input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
}
.form-group-terms label {
    margin: 0;
    font-weight: normal;
    font-size: 0.9rem;
    color: var(--text-color);
}
.form-group-terms label a {
    font-weight: bold;
}

/* --- Stili Box Prezzo Aggiornato --- */
#price-preview {
    background: linear-gradient(135deg, var(--light-color) 0%, #ffffff 100%);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px 25px;
    box-shadow: var(--shadow);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.price-preview-content {
    text-align: center;
}
.price-preview-content .price-label {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--dark-color);
    line-height: 1.2;
}
.price-preview-content .price-details {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-top: 5px;
}
.price-preview-content .price-error {
    font-size: 1.2rem;
    color: #a02c2c;
    font-weight: bold;
}

/* Bottone disabilitato */
#booking-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Responsive per card e form */
@media (max-width: 768px) {
    .tent-selection-grid.tent-count-2,
    .tent-selection-grid.tent-count-3 {
        grid-template-columns: 1fr; /* Una colonna su mobile */
    }
}