/* Stile Generale e Font */
body {
    font-family: 'Patrick Hand', cursive;
    background-image: url('background-buono.png');
    background-repeat: repeat;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 5px 10px;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 5px auto 20px;
    background-color: #fff;
    padding: 5px 30px 15px;
    border-radius: 25px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid #ccc;
}

/* Logo in alto */
.logo-container {
    text-align: center;
    margin-bottom: 0;
}
.logo-container img {
    max-width: 500px;
    width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Testo di invito sotto il logo */
.intro-text {
    text-align: center;
    font-size: 1.1em;
    margin: 5px 0 15px;
    color: #555;
}

/* Separatore ondulato (si applica a entrambi) */
.wavy-separator {
    height: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10'%3E%3Cpath d='M0 5 Q 12.5 0, 25 5 T 50 5 T 75 5 T 100 5' stroke='%234ecdc4' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: contain;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Rimosso o commentato stile per H1/H2 generico */
/* h1, h2 { ... } */
/* h1 { ... } */

/* Rimosso o commentato stile per #reviews-list h2 */
/* #reviews-list h2 { ... } */


/* Stile per l'h2 dentro il form */
#review-form-container h2 {
     font-size: 1.8em;
     color: #4ecdc4;
     text-align: center;
     border-bottom: none;
     padding-bottom: 0;
     margin-bottom: 15px;
}

/* Stile per l'immagine titolo recensioni */
.reviews-title-image {
    display: block;
    margin: 25px auto 15px; /* Aggiustato leggermente margine */
    /* MODIFICA: Ridotta drasticamente la larghezza */
    max-width: 400px;    /* Ridotto da 400px */
    width: 100%;          /* Ridotto da 80% */
    height: auto;
}


/* Bottoni */
.btn {
    font-family: 'Patrick Hand', cursive;
    padding: 12px 25px;
    border: 2px solid #555;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.2s ease-in-out;
    margin: 5px;
}

.btn-add {
    background-color: #ffeaa7;
    color: #333;
    display: block;
    width: fit-content;
    margin: 20px auto;
    font-size: 1.3em;
}
.btn-add:hover {
    background-color: #fdcb6e;
    transform: scale(1.05);
}

.btn-save { background-color: #55efc4; color: #333; }
.btn-save:hover { background-color: #00b894; }
.btn-save:disabled { background-color: #ccc; cursor: not-allowed; }

.btn-cancel { background-color: #fab1a0; color: #333; }
.btn-cancel:hover { background-color: #e17055; }

.btn-delete {
    background-color: #ff7675; color: white;
    font-size: 0.9em; padding: 5px 10px; border-radius: 10px;
    border: 1px solid #d63031; float: right;
}
.btn-delete:hover { background-color: #d63031; }

/* Form */
.form-container {
    background-color: #fdfdfd; border: 2px dashed #4ecdc4;
    padding: 20px; border-radius: 15px; margin-top: 20px; margin-bottom: 30px;
}
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 1.1em; color: #555; }
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group textarea {
    width: calc(100% - 22px); padding: 10px; border: 2px solid #ccc;
    border-radius: 10px; font-family: 'Patrick Hand', cursive; font-size: 1em;
}
.form-group textarea { resize: vertical; }
.form-buttons { text-align: center; margin-top: 20px; }

/* Radio buttons */
.radio-group label { display: inline-block; margin-right: 15px; font-weight: normal; font-size: 1em; cursor: pointer; }
.radio-group input[type="radio"] { margin-right: 5px; cursor: pointer; vertical-align: middle; }

/* Stelle PNG nel form */
.star-rating .star {
    width: 32px; height: 32px; cursor: pointer; margin-right: 5px; vertical-align: middle;
}

/* Stelle PNG nella visualizzazione */
.star-display {
    width: 24px;
    height: 24px;
    margin-right: 3px;
    vertical-align: middle;
}

/* Classe per nascondere/mostrare il form */
.hidden { display: none; }

/* Stile delle Recensioni Visualizzate */
.review-card {
    background-color: #fff; border: 3px solid #ffeaa7; border-radius: 20px;
    padding: 15px 20px; margin-bottom: 20px; box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden; position: relative;
}
.review-card h3 { margin-top: 0; margin-bottom: 10px; color: #ff6b6b; font-size: 1.6em; display: inline-block; }
.review-card .map-link { font-size: 0.9em; margin-left: 10px; color: #0984e3; text-decoration: none; vertical-align: middle; }
.review-card .map-link:hover { text-decoration: underline; }
.review-card p { margin: 8px 0; font-size: 1.1em; clear: both; }
.review-card .label { font-weight: bold; color: #555; margin-right: 5px; }
.review-card .notes { margin-top: 10px; font-style: italic; background-color: #f9f9f9; padding: 10px 12px; border-radius: 8px; border: 1px dashed #eee; clear: both; }
.review-card .notes .label { font-style: normal; }

/* Data sulla destra della card */
.review-card .review-date {
    position: absolute; top: 18px; right: 20px; font-size: 0.9em; color: #888;
}

/* Messaggio nessuna recensione */
#no-reviews-message { text-align: center; color: #888; font-style: italic; margin-top: 30px; padding: 20px; background-color: #f9f9f9; border-radius: 10px; }

/* --- Ordinamento recensioni --- */
.sort-buttons {
    text-align: right;
    margin-bottom: 15px;
}
.sort-buttons .btn { font-size: 0.9em; padding: 6px 12px; }

/* --- Media Queries per Mobile --- */
@media (max-width: 768px) {
    .container {
        padding: 5px 15px 15px;
    }
    .review-card h3 {
        font-size: 1.4em;
    }
    .review-card .review-date {
         top: 12px;
         right: 15px;
         font-size: 0.8em;
    }
    .wavy-separator {
         margin-top: 15px;
         margin-bottom: 15px;
         height: 12px;
    }
    /* Stile immagine titolo su mobile */
    .reviews-title-image {
        margin-top: 20px; /* Ridotto margine sopra */
        margin-bottom: 10px;
        max-width: 380px; /* MODIFICA: Ridotto da 350px */
        width: 100%;       /* MODIFICA: Ridotto da 85% */
    }
}

@media (max-width: 600px) {
    body {
        padding: 5px;
    }
    .container {
         margin-top: 5px;
         margin-bottom: 10px;
         padding: 5px 10px 10px;
         border-width: 2px;
    }
    .logo-container img {
        max-width: 90%;
    }
    .intro-text {
        font-size: 1em;
        margin: 5px 0 10px;
    }
     .wavy-separator {
         height: 10px;
         margin-top: 10px;
         margin-bottom: 15px;
    }

    /* Stile immagine titolo su mobile piccolo */
     .reviews-title-image {
        margin-top: 15px; /* Ridotto margine sopra */
        margin-bottom: 10px;
        max-width: 300px; /* MODIFICA: Ridotto da 300px */
        width: 90%;       /* MODIFICA: Ridotto da 90% */
    }

    /* Centra i bottoni di ordinamento */
    .sort-buttons {
        text-align: center;
        margin-bottom: 15px;
    }
    /* Opzionale: metti i bottoni uno sotto l'altro */
    /* .sort-buttons .btn { ... } */

    .btn-add { font-size: 1.1em; padding: 10px 20px; }
    .form-group label { font-size: 1em; }
    .radio-group label { font-size: 0.9em; margin-right: 10px; }

    .review-card { padding: 10px 15px; border-width: 2px; }
    .review-card h3 { font-size: 1.3em; margin-bottom: 5px;}
     .review-card .review-date {
         position: static;
         display: block;
         text-align: right;
         margin-bottom: 5px;
    }
    .review-card p { font-size: 1em; margin: 5px 0; }
    .star-display { width: 20px; height: 20px; }
}