/*
 * Java Editor Stylesheet
 * 
 * @version 1.1.0
 * @author DSE_v7.0
 */

/* --- الهيكل الرئيسي --- */
.java-editor-container {
    direction: rtl;
    background: #282c34;
    border: 1px solid #3d4148;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- الهيدر والأزرار --- */
.java-editor-header {
    background: #21252b;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3d4148;
}
.java-editor-tabs, .java-editor-actions {
    display: flex;
    gap: 10px;
}
.java-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #abb2bf;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}
.java-tab:hover {
    background: #3a3f48;
}
.java-tab.active {
    background: #4f5663;
    color: #ffffff;
}
.java-btn {
    padding: 8px 16px;
    border-radius: 5px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease-in-out;
}
.java-btn-primary { background-color: #28a745; color: white; border-color: #28a745; }
.java-btn-primary:hover { background-color: #218838; }
.java-btn-secondary { background-color: #6c757d; color: white; border-color: #6c757d; }
.java-btn-secondary:hover { background-color: #5a6268; }
.java-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- المحتوى ومحرر الكود --- */
.java-editor-body {
    min-height: 400px;
    position: relative;
}
.java-tab-content { display: none; }
.java-tab-content.active { display: block; }

/* CodeMirror styling */
.CodeMirror {
    height: 400px;
    direction: ltr;
    font-family: 'Fira Code', 'Consolas', monospace;
}
.CodeMirror-gutters { background: #282c34 !important; }

/* --- أقسام النتيجة ووحدة التحكم --- */
.java-output-content, .java-console-content {
    padding: 15px;
    font-family: 'Fira Code', 'Consolas', monospace;
    color: #ffffff;
    height: 400px;
    overflow-y: auto;
    background: #1e1e1e;
    font-size: 14px;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    border: 1px solid #3d4148;
    line-height: 1.5;
}

.java-output-content {
    background: #0d1117;
    color: #f0f6fc;
    border-left: 3px solid #28a745;
}

.java-output-content pre {
    margin: 0;
    color: #f0f6fc;
    background: transparent;
}

.java-output-placeholder, .java-console-placeholder {
    height: 100%; display: flex; align-items: center; justify-content: center; color: #6b727c; flex-direction: column; gap: 10px; font-size: 16px;
}
.java-output-placeholder i, .java-console-placeholder i { font-size: 40px; }
.java-console-content .console-line { padding: 2px 5px; border-bottom: 1px solid #282c34; }
.java-console-content .console-line.error { color: #e06c75; }
.java-console-content .console-line.success { color: #98c379; }
.java-console-content .time { color: #6b727c; margin-right: 10px; }
.error-msg { color: #e06c75; font-weight: bold; margin-bottom: 10px; }

/* --- شريط الحالة --- */
.java-editor-status {
    background: #21252b;
    padding: 5px 15px;
    color: #abb2bf;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #3d4148;
}
.java-editor-status .success { color: #98c379; }
.java-editor-status .error { color: #e06c75; }

/* --- أيقونات FontAwesome --- */
/* تأكد من أن القالب الخاص بك يحمل مكتبة FontAwesome */ 