/**
 * Stili aggiuntivi per pagine cartella 8
 * 
 * Stili specifici per il contenuto delle pagine
 * Gli stili base del tema sono in assets/css/theme.css
 * 
 * Questi stili seguono le convenzioni WordPress per coerenza
 */

/* Messaggi di successo/errore - Stile WordPress */
.message {
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    border-left: 4px solid;
}

.message-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.message-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.message-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.message-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Card/Box - Stile WordPress */
.card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin: 2rem 0;
}

.card-title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-family: "Kalam", cursive;
}

/* Bottoni - Stile DAIMON */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid;
    border-radius: 7px;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    word-break: break-word;
}

.btn-primary {
    background: #370F67; /* Viola DAIMON */
    border-color: #370F67;
    color: #ffffff;
}

.btn-primary:hover {
    background: #2a0c4f; /* Viola più scuro */
    border-color: #2a0c4f;
    color: #ffffff;
    text-decoration: none;
}

.btn-secondary {
    background: #ffffff;
    border-color: #666;
    color: #666;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #333;
    color: #333;
    text-decoration: none;
}

/* Form - Stile WordPress */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
    border-color: #0073aa;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

/* Form Row - Layout a riga per desktop */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group-half {
    flex: 0 0 calc(50% - 0.5rem);
}

.form-group-two-thirds {
    flex: 0 0 calc(66.666% - 0.5rem);
}

.form-group-one-third {
    flex: 0 0 calc(33.333% - 0.5rem);
}

.form-group-full {
    width: 100%;
}

/* Layout specifici per campi */
.form-group-nome {
    flex: 1 1 35%;
}

.form-group-secondi-nomi {
    flex: 0.7 1 25%;
}

.form-group-cognome {
    flex: 1 1 40%;
}

.form-group-via {
    flex: 1 1 auto;
    min-width: 0;
}

.form-group-civico {
    flex: 0 0 100px;
}

.form-group-cap {
    flex: 0 0 90px;
}

.form-group-citta {
    flex: 1 1 auto;
    min-width: 0;
}

.form-group-provincia {
    flex: 0 0 100px;
}

.form-group-codice-fiscale {
    flex: 0 0 calc(35% - 0.67rem);
}

.form-group-telefono {
    flex: 0 0 calc(32.5% - 0.67rem);
}

.form-group-email {
    flex: 0 0 calc(32.5% - 0.67rem);
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Stili specifici per pagina pacchetti */
.pacchetto-selector {
    margin-bottom: 2rem;
}

.pacchetto-info {
    background: #f8f8f8;
    border: 2px solid #370F67;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.pacchetto-info h3 {
    color: #370F67;
    margin-top: 0;
}

.pacchetto-dettagli {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.pacchetto-dettagli li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.pacchetto-dettagli li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.prezzo-totale {
    font-size: 2rem;
    font-weight: bold;
    color: #370F67;
    text-align: center;
    margin: 1.5rem 0;
}

/* Modalità pagamento */
.modalita-pagamento {
    margin: 2rem 0;
}

.modalita-pagamento-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.modalita-pagamento-option {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modalita-pagamento-option:hover {
    border-color: #370F67;
    background: #f8f8f8;
}

.modalita-pagamento-option input[type="radio"] {
    margin-right: 1rem;
    margin-top: 0.25rem;
    cursor: pointer;
}

.modalita-pagamento-option input[type="radio"]:checked + label {
    font-weight: 600;
    color: #370F67;
}

.modalita-pagamento-option label {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.modalita-pagamento-details {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 4px;
    display: none;
}

.modalita-pagamento-option input[type="radio"]:checked ~ .modalita-pagamento-details {
    display: block;
}

.iban-info {
    font-family: monospace;
    font-size: 1.1rem;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* Errori form */
.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #dc3545;
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cal.com link */
.cal-com-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    background: #370F67; /* Viola DAIMON */
    color: #ffffff;
    text-decoration: none;
    border-radius: 7px;
    font-weight: 600;
    transition: background 0.3s ease;
    border: 1px solid #370F67;
}

.cal-com-link:hover {
    background: #2a0c4f; /* Viola più scuro */
    border-color: #2a0c4f;
    color: #ffffff;
    text-decoration: none;
}

/* Responsive - Schermi grandi (>1024px) */
@media screen and (min-width: 1025px) {
    .form-row-large {
        display: flex;
    }
}

/* Responsive - Schermi medi (769px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* Su schermi medi, Codice Fiscale separato, Telefono e Email sulla stessa riga */
    .form-row-large {
        display: flex;
        flex-wrap: wrap;
    }
    
    .form-group-codice-fiscale {
        flex: 1 1 100%;
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .form-group-telefono,
    .form-group-email {
        flex: 0 0 calc(50% - 0.5rem);
    }
}

/* Responsive - Mobile */
@media screen and (max-width: 768px) {
    .modalita-pagamento-options {
        gap: 0.75rem;
    }
    
    .modalita-pagamento-option {
        padding: 0.75rem;
    }
    
    .prezzo-totale {
        font-size: 1.5rem;
    }
    
    /* Su mobile, i form-row si impilano */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group-half,
    .form-group-two-thirds,
    .form-group-one-third,
    .form-group-nome,
    .form-group-secondi-nomi,
    .form-group-cognome,
    .form-group-via,
    .form-group-civico,
    .form-group-cap,
    .form-group-citta,
    .form-group-provincia,
    .form-group-codice-fiscale,
    .form-group-telefono,
    .form-group-email {
        flex: 1 1 100%;
        width: 100%;
    }
}
