/* Questionario Plugin Styles */
.questionario-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 12, 73, 0.1);
}

.questionario-step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.questionario-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.questionario-step h2 {
    color: #000c49;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
}

/* Email Step */
#email-form, #access-code-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

#user-email, #access-code {
    width: 100%;
    max-width: 400px;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#user-email:focus, #access-code:focus {
    outline: none;
    border-color: #000c49;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 12, 73, 0.1);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-success {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 150px;
}

.btn-primary {
    background: linear-gradient(135deg, #000c49 0%, #1a237e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 12, 73, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 12, 73, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #000c49;
    border: 2px solid #000c49;
}

.btn-secondary:hover {
    background: #000c49;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Progress Bar */
#progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e5e9;
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #000c49 0%, #1a237e 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

/* Question Container */
#question-container {
    margin-bottom: 30px;
}

.question-item {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid #000c49;
    margin-bottom: 20px;
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    color: #000c49;
    margin-bottom: 25px;
    line-height: 1.4;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.answer-option:hover {
    border-color: #000c49;
    background: #f0f2ff;
    transform: translateX(5px);
}

.answer-option.selected {
    border-color: #000c49;
    background: linear-gradient(135deg, #f0f2ff 0%, #e8eaf6 100%);
    box-shadow: 0 4px 15px rgba(0, 12, 73, 0.1);
}

.answer-option input[type="radio"] {
    margin-right: 20px;
    width: 20px;
    height: 20px;
    accent-color: #000c49;
    flex-shrink: 0;
}

.answer-text {
    font-size: 16px;
    color: #333;
    flex: 1;
    padding-left: 5px;
}

/* Navigation */
#questionario-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

#questionario-navigation button {
    flex: 1;
    min-width: 120px;
}

/* Results */
#results-container {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #000c49;
}

.results-title {
    color: #000c49;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* .results-score rimossa - non più necessaria */

.results-message {
    font-size: 18px;
    color: #666;
    line-height: 1.5;
}

/* Error Messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #000c49;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .questionario-wrapper {
        margin: 10px;
        padding: 15px;
    }
    
    .questionario-step h2 {
        font-size: 24px;
    }
    
    .question-item {
        padding: 20px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    #questionario-navigation {
        flex-direction: column;
    }
    
    #questionario-navigation button {
        width: 100%;
    }
    
    .btn-primary, .btn-secondary, .btn-success {
        padding: 12px 25px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .questionario-wrapper {
        margin: 5px;
        padding: 10px;
    }
    
    .questionario-step h2 {
        font-size: 20px;
    }
    
    .question-item {
        padding: 15px;
    }
    
    .question-text {
        font-size: 16px;
    }
    
    .answer-option {
        padding: 12px 15px;
    }
    
    .answer-text {
        font-size: 14px;
    }
}
