/* Stile base del contenitore */
#preventivatore-app-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 24px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    overflow: hidden; /* Per le animazioni */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: relative; /* Per la barra di avanzamento */
}

/* --- Stile Barra di Avanzamento --- */
#pi-progress-bar {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
#pi-progress-bar p {
    margin: 0;
    font-size: 14px;
    color: #777;
    font-weight: 500;
}
#pi-progress-bar p span {
    font-weight: 700;
    color: #0073e6;
}

/* Gestione degli Step */
.preventivatore-step {
    display: none; /* Nascosti di default */
    animation: fadeIn 0.5s ease-in-out;
}
.preventivatore-step.active {
    display: block; /* Mostra solo lo step attivo */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#preventivatore-app-container h2 {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin-bottom: 24px;
}

#preventivatore-app-container p {
    text-align: center;
    color: #555;
    margin-bottom: 24px;
}

/* Stile Card (Step 1 & 2) */
.pi-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}
.pi-card {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pi-card:hover {
    border-color: #0073e6;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 115, 230, 0.1);
}
.pi-card.selected {
    border-color: #0073e6;
    background-color: #f0f8ff;
}
.pi-card img {
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.8;
}
.pi-card.selected img {
    opacity: 1;
}

/* Stile per Emoji */
.pi-emoji-icon {
    display: block;
    font-size: 40px;
    line-height: 1;
    margin-bottom: 12px;
    height: 48px; /* Allinea l'altezza a quella delle img */
    padding-top: 8px; /* Centra verticalmente l'emoji (circa) */
}

.pi-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.pi-card p {
    font-size: 14px;
    margin-bottom: 0;
}

/* Stile Slider (Step 3) */
.pi-slider-container {
    margin: 30px 0;
}
.pi-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
}
.pi-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0073e6;
    cursor: pointer;
}
.pi-slider-value {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #0073e6;
    margin-top: 16px;
}

/* Stile Toggle Switch (Step 3) */
.pi-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    padding: 16px 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
}

.pi-toggle-label {
    margin: 0;
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

.pi-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.pi-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pi-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.pi-switch-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .pi-switch-slider {
    background-color: #0073e6;
}

input:checked + .pi-switch-slider:before {
    transform: translateX(26px);
}

.pi-switch-slider.round {
    border-radius: 34px;
}
.pi-switch-slider.round:before {
    border-radius: 50%;
}


/* Stili per CF7 (Step 4) */
#preventivatore-step-4 .wpcf7-form {
    width: 100%;
}
#preventivatore-step-4 .wpcf7-form p {
    margin-bottom: 16px;
    text-align: left;
}
#preventivatore-step-4 .wpcf7-form label {
    font-weight: 500;
    color: #333;
    display: block;
    margin-bottom: 6px;
}

#preventivatore-step-4 .wpcf7-form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}
#preventivatore-step-4 .wpcf7-form-control:focus {
    border-color: #0073e6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.2);
}

/* Nasconde i campi 'hidden' di CF7 */
#preventivatore-step-4 .wpcf7-form-control-wrap[data-name="servizio-scelto"],
#preventivatore-step-4 .wpcf7-form-control-wrap[data-name="condizione-scelta"],
#preventivatore-step-4 .wpcf7-form-control-wrap[data-name="mq-scelti"],
#preventivatore-step-4 .wpcf7-form-control-wrap[data-name="include-soffitto"],
#preventivatore-step-4 .wpcf7-form-control-wrap[data-name="prezzo-stimato"] {
    display: none;
}

#preventivatore-step-4 .wpcf7-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: #0073e6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#preventivatore-step-4 .wpcf7-submit:hover {
    background-color: #005bb5;
}

#preventivatore-step-4 .wpcf7-spinner {
    position: absolute;
    right: 15px;
    bottom: 15px;
}

#preventivatore-step-4 .wpcf7-response-output {
    margin-top: 20px;
    border-radius: 6px;
}


/* Stile Bottone "Avanti" (usato nello Step 3) */
.pi-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: #0073e6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 32px;
}
.pi-btn:hover {
    background-color: #005bb5;
}

/* --- Stile Pulsante "Indietro" --- */
.pi-btn-back {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #0073e6;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 20px;
    padding: 8px;
    text-align: center;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}
.pi-btn-back:hover {
    background-color: #f0f8ff;
}

/* Stile Risultato (Step 5) */
.pi-prezzo-finale {
    font-size: 48px;
    font-weight: 800;
    color: #0073e6;
    text-align: center;
    margin: 20px 0;
}
.pi-disclaimer {
    font-size: 12px;
    color: #777;
    text-align: center;
}

/* Stile Loading (Step 6) */
#preventivatore-step-6 p {
    font-size: 18px;
    font-weight: 500;
}