/* Trauma Assessment Tests - Frontend Styles */

.trauma-test-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border: 1px solid #000000;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.1);
}

.trauma-test-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #000000;
}

.trauma-test-header h2 {
    color: #000000;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.test-description {
    color: #333333;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    font-style: italic;
}

.progress-indicator {
    margin-top: 20px;
    padding: 15px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

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

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #000000 0%, #333333 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-text {
    color: #666666;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.questions-container {
    margin-bottom: 40px;
}

.question-item {
    margin-bottom: 30px;
    padding: 25px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    transition: all 0.3s ease;
}

.question-item:hover {
    border-color: #000000;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.question-text {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.question-number {
    color: #000000;
    font-weight: 700;
    font-size: 18px;
    margin-right: 10px;
    min-width: 25px;
}

.question-content {
    color: #333333;
    font-size: 16px;
    line-height: 1.5;
    flex: 1;
}

.response-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.response-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.response-option:hover {
    border-color: #000000;
    background: #f8f8f8;
}

.response-option input[type="radio"] {
    margin: 0;
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #000000;
}

.response-option input[type="radio"]:checked + .option-text {
    font-weight: 700;
    color: #000000;
}

.response-option:has(input[type="radio"]:checked) {
    border-color: #000000;
    background: #f0f0f0;
    box-shadow: inset 0 0 0 2px #000000;
}

.option-text {
    color: #333333;
    font-size: 15px;
    transition: all 0.2s ease;
}

.test-actions {
    text-align: center;
    padding: 30px 0;
    border-top: 2px solid #000000;
}

.submit-test-btn {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #000000;
}

.submit-test-btn:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-test-btn:active {
    transform: translateY(0);
}

.submit-test-btn:disabled,
.submit-test-btn.disabled {
    background: #cccccc;
    color: #666666;
    border-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Styles */
.test-results {
    margin-top: 40px;
    padding: 30px;
    border: 2px solid #000000;
    background: #ffffff;
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-header h3 {
    color: #000000;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.gauge-container {
    position: relative;
    width: 200px;
    height: 200px;
}

.gauge-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 8px solid #e0e0e0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(from 0deg, #000000 0%, #000000 var(--score-angle, 0deg), #e0e0e0 var(--score-angle, 0deg));
    transition: all 1s ease;
}

.gauge-fill {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 2;
}

.gauge-text {
    text-align: center;
    position: relative;
    z-index: 3;
}

.score-percentage {
    font-size: 36px;
    font-weight: 700;
    color: #000000;
    line-height: 1;
    margin-bottom: 5px;
}

.score-label {
    font-size: 12px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.score-interpretation {
    text-align: center;
    max-width: 600px;
}

.interpretation-text {
    color: #333333;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
}

/* Loading States */
.trauma-test-form.loading .submit-test-btn {
    background: #666666;
    cursor: not-allowed;
}

.trauma-test-form.loading .submit-test-btn::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #ffffff;
    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) {
    .trauma-test-container {
        margin: 10px;
        padding: 15px;
    }
    
    .trauma-test-header h2 {
        font-size: 24px;
    }
    
    .question-item {
        padding: 20px 15px;
    }
    
    .response-options {
        gap: 8px;
    }
    
    .response-option {
        padding: 10px 12px;
    }
    
    .gauge-container {
        width: 150px;
        height: 150px;
    }
    
    .gauge-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-percentage {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .trauma-test-header h2 {
        font-size: 20px;
    }
    
    .test-description {
        font-size: 14px;
    }
    
    .question-content {
        font-size: 15px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .submit-test-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* Accessibility */
.response-option:focus-within {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

.submit-test-btn:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .trauma-test-container {
        border: none;
        box-shadow: none;
        max-width: none;
    }
    
    .test-actions {
        display: none;
    }
}
