/**
 * أنماط الواجهة العامة
 */

.tvq-voice-question-wrapper {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tvq-question-title {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.2em;
}

.tvq-question-description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

/* أزرار التسجيل */
.tvq-recorder-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tvq-btn-record,
.tvq-btn-stop,
.tvq-btn-save,
.tvq-btn-record-instructor,
.tvq-btn-stop-instructor,
.tvq-btn-save-instructor {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tvq-btn-record,
.tvq-btn-record-instructor {
    background: #4CAF50;
    color: white;
}

.tvq-btn-record:hover,
.tvq-btn-record-instructor:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tvq-btn-stop,
.tvq-btn-stop-instructor {
    background: #f44336;
    color: white;
}

.tvq-btn-stop:hover,
.tvq-btn-stop-instructor:hover {
    background: #da190b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tvq-btn-save,
.tvq-btn-save-instructor {
    background: #2196F3;
    color: white;
}

.tvq-btn-save:hover,
.tvq-btn-save-instructor:hover {
    background: #0b7dda;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tvq-btn-record:disabled,
.tvq-btn-stop:disabled,
.tvq-btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tvq-icon {
    font-size: 18px;
}

/* حالة التسجيل */
.tvq-recording-status {
    margin: 15px 0;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
}

.tvq-recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #856404;
    font-weight: 600;
}

.tvq-pulse {
    width: 12px;
    height: 12px;
    background: #f44336;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* التسجيلات المحفوظة */
.tvq-saved-recording,
.tvq-instructor-response,
.tvq-student-recording {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #2196F3;
}

.tvq-instructor-response {
    border-left-color: #4CAF50;
    background: #f1f8f4;
}

.tvq-student-recording {
    border-left-color: #ff9800;
}

.tvq-saved-recording h5,
.tvq-instructor-response h5,
.tvq-student-recording h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1em;
}

/* انتظار الرد */
.tvq-waiting-response {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 6px;
    text-align: center;
    color: #856404;
}

.tvq-waiting-response p {
    margin: 0;
    font-size: 16px;
}

/* رسالة التعليمات */
.tvq-instruction-message {
    margin-bottom: 20px;
    padding: 15px;
    background: #e7f3ff;
    border: 1px solid #2196F3;
    border-radius: 6px;
    border-left: 4px solid #2196F3;
}

.tvq-instruction-message p {
    margin: 5px 0;
    color: #0d47a1;
}

.tvq-instruction-message p:first-child {
    margin-top: 0;
    font-weight: 600;
}

/* حالة عدم وجود تسجيل */
.tvq-no-recording {
    margin-top: 20px;
    padding: 15px;
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 6px;
    text-align: center;
    color: #c62828;
}

.tvq-no-recording p {
    margin: 0;
    font-weight: 600;
}

/* واجهة المدرس */
.tvq-instructor-interface {
    margin-top: 20px;
}

.tvq-instructor-recording-area {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px dashed #ddd;
}

.tvq-instructor-recording-area h5 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.tvq-existing-response {
    margin-bottom: 20px;
}

.tvq-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin: 10px 0 0 0;
}

/* تحسينات للصوت */
audio {
    border-radius: 4px;
    outline: none;
}

audio::-webkit-media-controls-panel {
    background-color: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .tvq-voice-question-wrapper {
        padding: 15px;
    }
    
    .tvq-recorder-controls {
        flex-direction: column;
    }
    
    .tvq-btn-record,
    .tvq-btn-stop,
    .tvq-btn-save,
    .tvq-btn-record-instructor,
    .tvq-btn-stop-instructor,
    .tvq-btn-save-instructor {
        width: 100%;
        justify-content: center;
    }
}

