/* Wellness Assessment Plugin Styles */

.wellness-container {
    
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Arial', sans-serif;
}

div#wellness-assessment-container {
    max-width: 100% !important;
}

.wellness-question-panel {
    flex: 1;
    background: #fff;
    
    padding: 30px;
   
    border: 1px solid #e0e0e0;
}

.wellness-progress-bar {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    margin-bottom: 25px;
    overflow: hidden;
}

.wellness-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

.wellness-section-header {
    margin-bottom: 25px;
    text-align: center;
}

.wellness-section-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    transition: color 0.3s ease;
}

.wellness-question-counter {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.wellness-question-text {
    font-size: 18px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 30px;
    font-weight: 400;
    text-align: center;
}

.wellness-rating-scale {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
    flex-flow: row wrap;
}

.wellness-rating-button {
    width: 45px;
    height: 45px;
    border: 2px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wellness-rating-button:hover {
    border-color: #4CAF50;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    color:#000;
}

.wellness-rating-button.selected {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.wellness-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.wellness-completion-message {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.wellness-completion-title {
    font-size: 28px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 15px;
}

.wellness-completion-message p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.wellness-reset-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wellness-reset-button:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.wellness-chart-container {
    flex: 1;
    background: #fff;
    
    padding: 30px;
    
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wellnessScoreChart {
    max-width: 100%;
    max-height: 500px;
    width: 500px !important;
    height: 500px !important;
}

.wellness-loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}


/* Responsive Design */
@media (max-width: 768px) {
    .wellness-container {
        flex-direction: column;
        padding: 10px;
        gap: 20px;
    }
    
    .wellness-question-panel,
    .wellness-chart-container {
        padding: 20px;
    }
    
    .wellness-section-title {
        font-size: 20px;
    }
    
    .wellness-question-text {
        font-size: 16px;
    }
    
    .wellness-rating-button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .wellness-rating-scale {
        gap: 5px;
    }
    
    #wellnessScoreChart {
        width: 100% !important;
        height: 400px !important;
    }
}

@media (max-width: 480px) {
    .wellness-rating-button {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .wellness-rating-scale {
        gap: 3px;
    }
    
    #wellnessScoreChart {
        height: 300px !important;
    }
}

/* Animation for smooth transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wellness-question-panel {
    animation: fadeIn 0.5s ease;
}

.wellness-chart-container {
    animation: fadeIn 0.5s ease 0.2s both;
}


/* Ensure wellness assessment works properly in Elementor popups */
.elementor-popup-modal #wellness-assessment-container,
.dialog-widget-content #wellness-assessment-container {
    width: 100%;
    height: auto;
    min-height: 600px;
}

/* Chart container adjustments for popup */
.elementor-popup-modal .wellness-chart-container,
.dialog-widget-content .wellness-chart-container {
    width: 100%;
    height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Canvas sizing for popup environment */
.elementor-popup-modal .wellness-chart-container canvas,
.dialog-widget-content .wellness-chart-container canvas {
    max-width: 100% !important;
    max-height: 100% !important;
    width: 500px !important;
    height: 500px !important;
}

/* Responsive adjustments for smaller popups */
@media (max-width: 768px) {
    .elementor-popup-modal .wellness-chart-container,
    .dialog-widget-content .wellness-chart-container {
        height: 400px;
    }
    
    .elementor-popup-modal .wellness-chart-container canvas,
    .dialog-widget-content .wellness-chart-container canvas {
        width: 400px !important;
        height: 400px !important;
    }
}

@media (max-width: 480px) {
    .elementor-popup-modal .wellness-chart-container,
    .dialog-widget-content .wellness-chart-container {
        height: 300px;
    }
    
    .elementor-popup-modal .wellness-chart-container canvas,
    .dialog-widget-content .wellness-chart-container canvas {
        width: 300px !important;
        height: 300px !important;
    }
}

/* Ensure proper spacing in popup */
.elementor-popup-modal .wellness-container {
    padding: 20px;
    box-sizing: border-box;
}

/* Fix for Elementor popup z-index issues */
.elementor-popup-modal .wellness-rating-button {
    position: relative;
    z-index: 1;
}

/* Loading state improvements for popup */
.elementor-popup-modal .wellness-loading,
.dialog-widget-content .wellness-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    font-size: 18px;
    color: #666;
}