/* Stili aggiuntivi per il funnel aggiornato */

/* Stile per le opzioni con tag "consigliato" */
.option-btn.recommended {
    border: 2px solid var(--accent-color);
    background-color: rgba(var(--accent-rgb), 0.05);
    position: relative;
}

.recommended-tag {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--accent-color);
    color: white;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Box informativo nel funnel */
.funnel-info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    background-color: rgba(var(--primary-rgb), 0.05);
    border-left: 3px solid var(--primary-color);
}

.funnel-info-box i {
    color: var(--primary-color);
    font-size: 16px;
    margin-top: 2px;
}

.funnel-info-box p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Testo descrittivo sotto il titolo del passo */
.step-description {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 15px;
}

/* Stile per le opzioni di addon */
.addon-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 15px 0;
}

.addon-option {
    display: flex;
    flex-direction: column;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.addon-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.02);
}

.addon-option input[type="checkbox"] {
    position: absolute;
    top: 15px;
    right: 15px;
}

.addon-name {
    font-weight: 600;
    margin-bottom: 5px;
    padding-right: 25px;
}

.addon-description {
    font-size: 12px;
    color: var(--text-muted);
}

.addon-option:has(input:checked) {
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.05);
}

/* Aggiusta la barra di progresso per più passi */
.funnel-step[id="step1"] ~ .funnel-nav .progress-bar {
    width: 14.28%; /* 1/7 */
}

.funnel-step[id="step2"].active ~ .funnel-nav .progress-bar {
    width: 28.57%; /* 2/7 */
}

.funnel-step[id="step3"].active ~ .funnel-nav .progress-bar {
    width: 42.85%; /* 3/7 */
}

.funnel-step[id="step4"].active ~ .funnel-nav .progress-bar {
    width: 57.14%; /* 4/7 */
}

.funnel-step[id="step5"].active ~ .funnel-nav .progress-bar {
    width: 71.42%; /* 5/7 */
}

.funnel-step[id="step6"].active ~ .funnel-nav .progress-bar {
    width: 85.71%; /* 6/7 */
}

.funnel-step[id="step7"].active ~ .funnel-nav .progress-bar {
    width: 100%; /* 7/7 */
}

/* Responsive per dispositivi mobili */
@media (max-width: 768px) {
    .addon-options {
        grid-template-columns: 1fr;
    }
    
    .step-options {
        flex-direction: column;
    }
}

/* Stili aggiuntivi per gli step finali del funnel */

/* Form all'interno del funnel */
.funnel-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.funnel-form .form-group {
    margin-bottom: 0;
}

.funnel-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
}

.funnel-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.funnel-input.error {
    border-color: #ff3b30;
}

/* Step di successo */
.success-content {
    text-align: center;
    padding: 30px 20px;
}

.success-icon {
    font-size: 60px;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.success-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.success-content p {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.bonus-message {
    display: inline-block;
    background-color: rgba(var(--accent-rgb), 0.1);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--accent-color);
}

.bonus-message i {
    margin-right: 8px;
}

/* Aggiorna la barra di progresso per 8 step totali */
.funnel-step[id="step1"] ~ .funnel-nav .progress-bar {
    width: 12.5%; /* 1/8 */
}

.funnel-step[id="step2"].active ~ .funnel-nav .progress-bar {
    width: 25%; /* 2/8 */
}

.funnel-step[id="step3"].active ~ .funnel-nav .progress-bar {
    width: 37.5%; /* 3/8 */
}

.funnel-step[id="step4"].active ~ .funnel-nav .progress-bar {
    width: 50%; /* 4/8 */
}

.funnel-step[id="step5"].active ~ .funnel-nav .progress-bar {
    width: 62.5%; /* 5/8 */
}

.funnel-step[id="step6"].active ~ .funnel-nav .progress-bar {
    width: 75%; /* 6/8 */
}

.funnel-step[id="step7"].active ~ .funnel-nav .progress-bar {
    width: 87.5%; /* 7/8 */
}

.funnel-step[id="step8"].active ~ .funnel-nav .progress-bar {
    width: 100%; /* 8/8 */
}

/* Nascondi i pulsanti nel passo finale di successo */
.funnel-step[id="step9"].active ~ .funnel-nav {
    display: none;
}

/* Stile per lo step di successo */
.funnel-step[id="step9"] {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Aggiunta per l'indicatore di caricamento */
.funnel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 10px;
    background-color: rgba(var(--primary-rgb), 0.1);
    border-radius: 6px;
    font-weight: 500;
}

.funnel-loading i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 18px;
}

/* Input error styles */
.funnel-input.error {
    border-color: #ff3b30;
    background-color: rgba(255, 59, 48, 0.05);
}

.checkbox-consent.error .checkbox {
    color: #ff3b30;
}