/* WordPress Diagnostic Plugin Frontend Styles */

/* Quiz Container */
.wdp-quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Quiz Header */
.wdp-quiz-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wdp-quiz-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.wdp-quiz-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Progress Bar */
.wdp-progress-container {
    margin-bottom: 30px;
}

.wdp-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

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

.wdp-progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Quiz Content */
.wdp-quiz-content {
    min-height: 300px;
    margin-bottom: 30px;
}

.wdp-question {
    margin-bottom: 30px;
    animation: fadeIn 0.3s ease-in;
}

.wdp-question-lead {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-style: italic;
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #4CAF50;
}

.wdp-question-text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

.wdp-question-number {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Answer Options */
.wdp-answers {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wdp-answer {
    margin-bottom: 12px;
}

.wdp-answer-label {
    display: block;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    line-height: 1.4;
    position: relative;
}

.wdp-answer-label:hover {
    background: #e3f2fd;
    border-color: #2196F3;
    transform: translateY(-1px);
}

.wdp-answer-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wdp-answer-input:checked + .wdp-answer-label {
    background: #e8f5e8;
    border-color: #4CAF50;
    color: #2e7d32;
    font-weight: 600;
}

.wdp-answer-input:checked + .wdp-answer-label::after {
    content: "✓";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #4CAF50;
    font-weight: bold;
    font-size: 18px;
}

/* Navigation Buttons */
.wdp-quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.wdp-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.wdp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.wdp-btn-primary {
    background: #4CAF50;
    color: white;
}

.wdp-btn-primary:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-1px);
}

.wdp-btn-secondary {
    background: #6c757d;
    color: white;
}

.wdp-btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Result Display */
.wdp-quiz-result {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-top: 30px;
}

.wdp-result-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.wdp-result-score {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.wdp-result-level {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.wdp-result-message {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 20px;
    opacity: 0.9;
    font-style: italic;
}

.wdp-result-content {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.95;
}

.wdp-result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.wdp-result-actions .wdp-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.wdp-result-actions .wdp-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}



/* Loading States */
.wdp-loading {
    text-align: center;
    padding: 40px 20px;
}

.wdp-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Error States */
.wdp-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
    text-align: center;
}

.wdp-error-message {
    background: #fff3cd;
    color: #856404;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
    margin: 20px 0;
    text-align: center;
}

/* Theme Variations */
.wdp-theme-minimal {
    box-shadow: none;
    border: 1px solid #e0e0e0;
}

.wdp-theme-minimal .wdp-quiz-header {
    border-bottom: 1px solid #e0e0e0;
}

.wdp-theme-dark {
    background: #2c3e50;
    color: #ecf0f1;
}

.wdp-theme-dark .wdp-quiz-title {
    color: #ecf0f1;
}

.wdp-theme-dark .wdp-answer-label {
    background: #34495e;
    border-color: #4a6741;
    color: #ecf0f1;
}

.wdp-theme-dark .wdp-answer-label:hover {
    background: #3498db;
    border-color: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wdp-quiz-container {
        margin: 10px;
        padding: 15px;
    }
    
    .wdp-quiz-title {
        font-size: 24px;
    }
    
    .wdp-question-text {
        font-size: 18px;
    }
    
    .wdp-answer-label {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .wdp-quiz-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .wdp-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .wdp-result-score {
        font-size: 36px;
    }
    
    .wdp-result-actions {
        flex-direction: column;
        align-items: center;
    }
    

}

@media (max-width: 480px) {
    .wdp-quiz-container {
        margin: 5px;
        padding: 10px;
    }
    
    .wdp-quiz-title {
        font-size: 20px;
    }
    
    .wdp-question-text {
        font-size: 16px;
    }
    
    .wdp-answer-label {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* Accessibility */
.wdp-answer-input:focus + .wdp-answer-label {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.wdp-btn:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .wdp-quiz-navigation {
        display: none;
    }
    
    .wdp-quiz-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}