/* ============================================
   Scoring Systems CSS
   For Wexner, Vaizey, Altomare ODS, SF-36, etc.
   ============================================ */

/* Section Container */
.scoring-subsection {
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.scoring-subsection h4 {
    margin: 0 0 20px 0;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 8px;
    border-bottom: 3px solid var(--primary-dark);
    color: #ffffff !important;
    font-size: 1.3em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.scoring-subsection h4 i {
    color: #ffffff !important;
}

.scoring-subsection h4 .en,
.scoring-subsection h4 .ar {
    color: #ffffff !important;
}

/* Scoring Content */
.scoring-content {
    padding: 15px 0;
}

.scoring-form {
    width: 100%;
}

/* Introduction Section */
.scoring-intro {
    margin-bottom: 25px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
    border-left: 4px solid #2196F3;
    border-radius: 8px;
}

.scoring-intro p {
    margin: 8px 0;
    font-size: 1em;
    color: #424242;
}

.scoring-intro p:first-child {
    font-weight: 600;
    color: #1976d2;
}

/* Scoring Scale Legend */
.scoring-scale {
    margin: 15px 0;
    padding: 12px 15px;
    background: #fff9c4;
    border: 1px solid #fbc02d;
    border-radius: 6px;
    font-size: 0.95em;
    line-height: 1.6;
    color: #333;
}

.scoring-scale strong {
    color: #f57c00;
    font-weight: 700;
}

/* Subsection Titles */
.subsection-title {
    margin: 25px 0 15px 0;
    padding: 10px 15px;
    background: linear-gradient(135deg, #90caf9 0%, #64b5f6 100%);
    color: white;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
}

/* Scoring Table */
.scoring-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.scoring-table thead {
    background: linear-gradient(135deg, #2196F3 0%, #1976d2 100%);
    color: white;
}

.scoring-table thead th {
    padding: 12px 10px;
    font-weight: 600;
    text-align: center;
    font-size: 0.95em;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.scoring-table thead th:last-child {
    border-right: none;
}

.scoring-table thead th .small {
    display: block;
    font-size: 0.8em;
    font-weight: 400;
    margin-top: 4px;
    opacity: 0.9;
}

.scoring-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.scoring-table tbody tr:hover {
    background: #f5f5f5;
}

.scoring-table tbody tr:last-child {
    border-bottom: none;
}

.scoring-table tbody td {
    padding: 14px 12px;
    text-align: center;
    vertical-align: middle;
}

.scoring-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    background: #fafafa;
    border-right: 2px solid #e0e0e0;
    min-width: 200px;
}

.scoring-table tbody td strong {
    display: block;
    margin-bottom: 3px;
}

.scoring-table tbody td strong.en {
    color: #333;
}

.scoring-table tbody td strong.ar {
    color: #666;
    font-size: 0.95em;
}

/* Radio Button Styling */
.scoring-table input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2196F3;
    transform: scale(1.2);
}

.scoring-table input[type="radio"]:hover {
    transform: scale(1.4);
    transition: transform 0.2s ease;
}

.scoring-table input[type="radio"]:checked {
    filter: drop-shadow(0 0 4px rgba(33, 150, 243, 0.6));
}

/* Row Selection Highlight */
.scoring-table tbody tr:has(input[type="radio"]:checked) {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
}

/* Scoring Result Section */
.scoring-result {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8eaf6 100%);
    border-radius: 12px;
    border: 2px solid #2196F3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.score-display {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}

.score-display span {
    font-size: 1.2em;
    font-weight: 600;
    color: #424242;
    margin-right: 10px;
}

.score-display strong {
    font-size: 2.5em !important;
    font-weight: 700;
    color: #4caf50;
    margin: 0 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Score Interpretation */
.score-interpretation {
    text-align: center;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    border-left: 5px solid #4caf50;
}

.interpretation-text {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.6;
}

.interpretation-text strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.2em;
}

/* Color Coding for Severity Levels */
.score-perfect {
    color: #4caf50 !important;
    border-left-color: #4caf50 !important;
}

.score-good {
    color: #8bc34a !important;
    border-left-color: #8bc34a !important;
}

.score-moderate {
    color: #ff9800 !important;
    border-left-color: #ff9800 !important;
}

.score-severe {
    color: #f44336 !important;
    border-left-color: #f44336 !important;
}

/* Badge Icons for Interpretation */
.interpretation-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    margin: 10px 0;
    font-size: 1em;
}

.badge-perfect {
    background: #4caf50;
    color: white;
}

.badge-good {
    background: #8bc34a;
    color: white;
}

.badge-moderate {
    background: #ff9800;
    color: white;
}

.badge-severe {
    background: #f44336;
    color: white;
}

/* Scoring Note (Coming Soon messages) */
.scoring-note {
    padding: 20px;
    text-align: center;
    background: #fff9c4;
    border: 2px dashed #fbc02d;
    border-radius: 8px;
    color: #f57c00;
    font-size: 1.1em;
    font-weight: 500;
}

.scoring-note i {
    display: block;
    font-size: 2em;
    margin-bottom: 10px;
    color: #fbc02d;
}

/* Action Buttons */
.scoring-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn-score-save,
.btn-score-clear,
.btn-score-reset {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-score-save {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
}

.btn-score-save:hover {
    background: linear-gradient(135deg, #45a049 0%, #2e7d32 100%);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

.btn-score-clear {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.btn-score-clear:hover {
    background: linear-gradient(135deg, #fb8c00 0%, #ef6c00 100%);
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.4);
    transform: translateY(-2px);
}

.btn-score-reset {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    color: white;
}

.btn-score-reset:hover {
    background: linear-gradient(135deg, #757575 0%, #616161 100%);
    box-shadow: 0 4px 10px rgba(158, 158, 158, 0.4);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .scoring-table {
        font-size: 0.85em;
    }
    
    .scoring-table thead th {
        padding: 8px 5px;
    }
    
    .scoring-table thead th .small {
        font-size: 0.75em;
    }
    
    .scoring-table tbody td {
        padding: 10px 6px;
    }
    
    .scoring-table tbody td:first-child {
        min-width: 150px;
        font-size: 0.9em;
    }
    
    .scoring-table input[type="radio"] {
        width: 18px;
        height: 18px;
        transform: scale(1);
    }
    
    .score-display strong {
        font-size: 2em !important;
    }
    
    .scoring-actions {
        flex-direction: column;
    }
    
    .btn-score-save,
    .btn-score-clear,
    .btn-score-reset {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .scoring-subsection {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .scoring-actions {
        display: none;
    }
    
    .scoring-table input[type="radio"] {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Animation for Score Changes */
@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.score-display strong.updating {
    animation: scoreUpdate 0.5s ease;
}

/* Accessibility */
.scoring-table input[type="radio"]:focus {
    outline: 3px solid #2196F3;
    outline-offset: 3px;
}

/* Bilingual Support */
[lang="ar"] .scoring-table tbody td:first-child {
    text-align: right;
}

[lang="ar"] .score-display,
[lang="ar"] .score-interpretation {
    direction: rtl;
}
