/*
Theme Name: Twenty Twenty-Five Child
Theme URI: https://example.com/
Description: Tema child di Twenty Twenty-Five
Author: Il tuo nome
Template: twentytwentyfive
Version: 1.0.0
Text Domain: twentytwentyfive-child
*/

.cpb-two-columns-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 50px;
    align-items: start;
    width: calc(100% - 50px);
    margin: 30px 0;
}

.cpb-left-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cpb-right-column {
    position: sticky;
    top: 40px;
}

/* Box grafico */
.cpb-chart-box {
    width: 100%;
    max-width: 520px;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
}

.cpb-chart-box h3 {
    margin-top: 0;
    text-align: center;
    letter-spacing: 1px;
    font-size: 20px;
}

.cpb-chart-box canvas {
    max-width: 100%;
}

.cpb-calculated-info {
    margin-bottom: 20px;
    font-size: 16px;
}

.cpb-calculated-info p {
    margin: 6px 0;
}

/* Messaggio errore */
.cpb-error-message {
    margin: 15px 0;
    padding: 12px 16px;
    border: 1px solid #c00;
    background: #ffecec;
    color: #c00;
    font-weight: 600;
    border-radius: 6px;
}

/* Preview casi stimati */
.cpb-cases-preview {
    margin-top: 20px;
    font-size: 15px;
}

.cpb-cases-preview h4 {
    margin-bottom: 8px;
}

.cpb-cases-preview ul {
    margin: 0;
    padding-left: 20px;
}

/* Contenitore pulsanti Formidable */
.frm_submit {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
	justify-content: space-between;
}

/* Previous a sinistra */
.frm_submit .frm_prev_page {
    order: 1;
}

/* Save Draft vicino a Previous */
.frm_submit .frm_save_draft {
    order: 2;
	display:none;
}

/* Testo autosave dopo Save Draft */
.frm_submit #frm-auto-save-time {
    order: 3;
    font-size: 13px;
    opacity: 0.7;
}

/* Next a destra */
.frm_submit .frm_button_submit {
    order: 10;
    margin-left: auto!important;
}

/* Mobile */
@media (max-width: 900px) {
    .frm_fields_container {
        display: block;
    }

    .cpb-chart-field {
        position: static;
        margin-top: 30px;
    }

    .cpb-chart-box {
        max-width: 100%;
    }
	
    .cpb-two-columns-layout {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .cpb-left-column {
        order: 1;
        width: 100%;
		gap:0;
    }

    .cpb-right-column {
        order: 2;
        width: 100%;
        position: static;
        margin-top: 20px;
    }

    .cpb-chart-box {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
		padding: 10px;
    }

    .cpb-chart-box canvas {
        max-width: 100%;
        height: auto !important;
    }
}