/**
 * ستايل النموذج العام لتقييم الموهبة - محسن
 */

/* المتغيرات */
:root {
    --primary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #dc3545;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --text-color: #495057;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* التصميم الأساسي */
.talent-assessment-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Arial', 'Tahoma', sans-serif;
    direction: rtl;
    text-align: right;
}

.talent-assessment-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
}

/* جدول تفسير النتائج - متجاوب */
.talent-assessment-results-table {
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.talent-assessment-results-table h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    text-align: center;
}

.talent-results-mobile-view {
    display: none;
}

.talent-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.talent-results-table th,
.talent-results-table td {
    padding: 12px;
    border: 1px solid #dee2e6;
    text-align: center;
}

.talent-results-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.talent-results-table tr:nth-child(even) {
    background-color: var(--light-gray);
}

/* تصميم متجاوب للجدول */
@media (max-width: 768px) {
    .talent-results-table {
        display: none !important;
    }
    
    .talent-results-mobile-view {
        display: block !important;
    }
    
    .talent-result-item {
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 12px;
        box-shadow: var(--shadow);
    }
    
    .talent-score-range {
        background: var(--primary-color);
        color: white;
        padding: 8px 12px;
        border-radius: 20px;
        font-weight: bold;
        text-align: center;
        margin-bottom: 10px;
        display: inline-block;
        min-width: 80px;
    }
    
    .talent-score-description {
        color: var(--text-color);
        line-height: 1.5;
        font-size: 14px;
    }
}

/* النموذج */
.talent-assessment-form {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.talent-form-section {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.talent-form-section legend {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
}

.talent-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.talent-form-field {
    flex: 1;
    min-width: 250px;
}

.talent-form-field-full {
    flex-basis: 100%;
}

.talent-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-color);
}

.talent-form-field input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.talent-form-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.talent-form-field input.talent-field-error {
    border-color: var(--danger-color) !important;
    background-color: #fff5f5;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1) !important;
}

/* قسم الأسئلة */
.talent-questions-section {
    border-color: var(--success-color);
}

.talent-questions-section legend {
    background: var(--success-color);
}

/* شريط التقدم العائم */
.talent-progress-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    z-index: 100;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    padding: 15px;
}

.talent-progress-track {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.talent-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #2ecc71);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* الأسئلة */
.talent-question {
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.talent-question:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.talent-question.talent-field-error {
    border-color: var(--danger-color);
    background-color: #fff5f5;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.talent-question-text {
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 15px;
    word-wrap: break-word;
}

/* خيارات الإجابة - متجاوبة */
.talent-question-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    justify-content: center;
}

.talent-radio-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 12px 8px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 80px;
    background: white;
    text-align: center;
}

.talent-radio-option:hover {
    border-color: var(--primary-color);
    background: #ebf3fd;
    transform: translateY(-2px);
}

.talent-radio-option:has(input:checked) {
    border-color: var(--primary-color);
    background: #ebf3fd;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.talent-radio-option input[type="radio"] {
    margin: 0 0 8px 0;
    transform: scale(1.2);
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.talent-radio-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.talent-radio-number {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 4px;
    line-height: 1;
}

.talent-radio-text {
    font-size: 11px;
    color: #6c757d;
    line-height: 1.3;
}

/* تصميم متجاوب للأسئلة */
@media (max-width: 1024px) {
    .talent-question-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .talent-question-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .talent-radio-option {
        padding: 10px 6px;
        min-height: 75px;
    }
    
    .talent-radio-number {
        font-size: 18px;
    }
    
    .talent-radio-text {
        font-size: 10px;
    }
    
    .talent-progress-sticky {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        z-index: 1000;
    }
}

@media (max-width: 480px) {
    .talent-question-options {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .talent-radio-option {
        flex-direction: row;
        justify-content: flex-start;
        text-align: right;
        padding: 12px 15px;
        min-height: auto;
        gap: 12px;
    }
    
    .talent-radio-label {
        flex-direction: row;
        align-items: center;
        text-align: right;
        gap: 8px;
        justify-content: flex-start;
    }
    
    .talent-radio-number {
        font-size: 16px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .talent-radio-text {
        font-size: 12px;
        text-align: right;
        flex: 1;
    }
}

/* زر الإرسال */
.talent-form-submit {
    text-align: center;
    margin-top: 30px;
}

.talent-submit-button {
    background: linear-gradient(45deg, var(--primary-color), #2980b9);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    touch-action: manipulation;
}

.talent-submit-button:hover {
    background: linear-gradient(45deg, #2980b9, var(--primary-color));
    transform: translateY(-2px);
}

.talent-submit-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* النتيجة */

/* النتيجة */
.talent-result-container {
    margin-top: 30px;
    padding: 30px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.talent-result-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 24px;
    border-bottom: 2px solid #27ae60;
    padding-bottom: 10px;
}

.talent-result-section {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 8px;
}

.talent-child-info {
    background: #f8f9fa;
    border-left: 5px solid #3498db;
}

.talent-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.talent-info-item strong {
    color: #495057;
}

.talent-score-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.talent-score-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.talent-score-item {
    padding: 20px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
}

.talent-score-number {
    font-size: 36px;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.talent-level-badge {
    font-size: 20px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    margin-bottom: 10px;
}

.talent-level-عالي-جداً { background: #27ae60; color: white; }
.talent-level-متوسط-إلى-عالي { background: #f39c12; color: white; }
.talent-level-فوق-المتوسط { background: #3498db; color: white; }
.talent-level-ضعيف { background: #95a5a6; color: white; }

.talent-score-label {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.talent-description-section {
    background: #e8f5e8;
    border-left: 5px solid #27ae60;
}

.talent-recommendations {
    background: #fff3cd;
    border-left: 5px solid #f39c12;
}

.talent-recommendations ul {
    margin-top: 10px;
    padding-right: 20px;
}

.talent-recommendations li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.talent-meta-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.talent-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.talent-result-actions {
    text-align: center;
    margin: 25px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.talent-print-button,
.talent-new-assessment-button {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.talent-print-button {
    background: #3498db;
    color: white;
}

.talent-new-assessment-button {
    background: #27ae60;
    color: white;
}

.talent-print-button:hover,
.talent-new-assessment-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.talent-result-note {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    margin-top: 20px;
}

/* رسائل الخطأ */
.talent-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
    color: #721c24;
    border: 2px solid #f1aeb5;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    animation: slideDown 0.3s ease-out;
}

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

.talent-error strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.talent-error ul {
    margin: 0;
    padding-right: 20px;
}

.talent-error li {
    margin-bottom: 5px;
    line-height: 1.4;
}

/* تصميم متجاوب عام */
@media (max-width: 768px) {
    .talent-assessment-wrapper {
        padding: 15px;
    }
    
    .talent-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .talent-form-field {
        min-width: auto;
    }
    
    .talent-form-field input,
    .talent-form-field select,
    .talent-form-field textarea {
        font-size: 16px; /* منع zoom في iOS */
        min-height: 44px;
    }
    
    .talent-result-actions {
        flex-direction: column;
    }
}

/* طباعة */
@media print {
    .talent-assessment-wrapper {
        max-width: none;
        margin: 0;
        padding: 20px;
    }
    
    .talent-assessment-form,
    .talent-result-actions {
        display: none !important;
    }
    
    .talent-score-section {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
}
