/* Flow Index Wizard Styles */

#flow-index-wizard {
    position: relative;
}

/* Override global reveal animations - higher specificity than main.css */
#flow-index-wizard .wizard-step [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
}

/* Step visibility control */
#flow-index-wizard .wizard-step {
    display: none;
}

#flow-index-wizard .wizard-step.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

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

.wizard-step.fade-out {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}

/* Question Cards */
.question-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 28px;
    transition: all 0.3s ease;
}

.question-card:hover {
    border-color: #27ae60;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.1);
}

.question-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.7;
    margin-bottom: 24px;
}

.question-text strong {
    display: inline-block;
    min-width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    margin-right: 12px;
    padding: 0 10px;
}

/* Answer Scale */
.answer-scale {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 10px;
}

.scale-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.scale-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.scale-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 45px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.2s ease;
}

.scale-option:hover .scale-label {
    background: #e9ecef;
    border-color: #adb5bd;
}

.scale-option input[type="radio"]:checked + .scale-label {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-color: #27ae60;
    color: #fff;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.scale-legend {
    font-size: 0.875rem;
    padding: 0 8px;
}

/* Yes/No Answers */
.answer-yesno {
    display: flex;
    gap: 16px;
    margin: 20px 0;
}

.yesno-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.yesno-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.yesno-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 45px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.2s ease;
}

.yesno-option:hover .yesno-label {
    background: #e9ecef;
    border-color: #adb5bd;
}

.yesno-option input[type="radio"]:checked ~ .yesno-label {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-color: #27ae60;
    color: #fff;
    transform: scale(1.05);
}

/* Multiple Choice Answers */
.answer-multiple {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.multiple-option {
    position: relative;
    cursor: pointer;
}

.multiple-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.multiple-label {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 45px;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
}

.multiple-option:hover .multiple-label {
    background: #e9ecef;
    border-color: #adb5bd;
}

.multiple-option input[type="radio"]:checked ~ .multiple-label {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-color: #27ae60;
    color: #fff;
    transform: translateX(4px);
}

/* Progress Bar */
.wizard-progress {
    position: sticky;
    bottom: 20px;
}

/* Results Section */
#results-container {
    padding: 40px 20px;
}

.result-score {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    margin: 30px 0;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-label {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.result-description {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 40px;
}

/* Dimension Scores */
.dimension-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.dimension-score-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.dimension-score-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.dimension-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.dimension-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.dimension-score-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.dimension-score-max {
    font-size: 1rem;
    color: #6c757d;
}

/* Recommendations */
.recommendations-section {
    margin: 40px 0;
    text-align: left;
}

.recommendation-card {
    background: #fff3cd;
    border-left: 4px solid #f39c12;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.recommendation-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #856404;
    margin-bottom: 8px;
}

.recommendation-text {
    color: #856404;
    margin: 0;
}

/* Radar Chart Container */
.radar-chart-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

/* CTA Buttons */
.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.result-actions .lotus-btn,
.result-actions .btn {
    min-width: 200px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #flow-index-wizard {
        padding: 0;
    }
    
    .wizard-step.active {
        min-height: 50vh;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .question-text {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .answer-scale {
        gap: 8px;
    }
    
    .scale-label {
        height: 50px;
        font-size: 1.2rem;
    }
    
    .result-score {
        font-size: 4rem;
    }
    
    .dimension-scores {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .lotus-btn,
    .result-actions .btn {
        width: 100%;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Error Messages */
.wizard-error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    padding: 12px 16px;
    color: #842029;
    margin-bottom: 16px;
    display: none;
}

.wizard-error.show {
    display: block;
}

/* Success Animation */
@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}
