/* =====================================================
   Markdown to PDF Tool - Additional Styles
   ===================================================== */

/* Editor Container */
.editor-container {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border, #e5e7eb);
    overflow: hidden;
    margin-bottom: 24px;
}

.editor-header {
    background: var(--bg-light, #f9fafb);
    border-bottom: 1px solid var(--border, #e5e7eb);
    padding: 8px 16px;
}

.editor-tabs {
    display: flex;
    gap: 4px;
}

.editor-tab {
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light, #6b7280);
    transition: all 0.2s;
}

.editor-tab i {
    margin-right: 6px;
}

.editor-tab:hover {
    background: var(--border, #e5e7eb);
    color: var(--text, #111827);
}

.editor-tab.active {
    background: white;
    color: var(--primary, #00008B);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.editor-area {
    display: flex;
    min-height: 400px;
}

.editor-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border, #e5e7eb);
}

.editor-column:last-child {
    border-right: none;
}

.column-header {
    padding: 12px 16px;
    background: var(--bg-light, #f9fafb);
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-weight: 600;
    font-size: 13px;
    color: var(--text, #111827);
}

.column-header i {
    margin-right: 6px;
    color: var(--primary, #00008B);
}

.markdown-input {
    width: 100%;
    height: 400px;
    padding: 16px;
    border: none;
    resize: vertical;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: white;
    color: var(--text, #111827);
}

.markdown-input:focus {
    outline: none;
}

.html-preview {
    height: 400px;
    padding: 16px;
    overflow-y: auto;
    background: white;
    font-size: 14px;
    line-height: 1.6;
}

/* تنسيق معاينة HTML */
.html-preview h1, .html-preview h2, .html-preview h3,
.html-preview h4, .html-preview h5, .html-preview h6 {
    margin-top: 1.2em;
    margin-bottom: 0.6em;
    font-weight: 600;
}

.html-preview h1 { font-size: 1.8rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.3em; }
.html-preview h2 { font-size: 1.5rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.3em; }
.html-preview h3 { font-size: 1.25rem; }
.html-preview p { margin-bottom: 1em; }
.html-preview code { background: #f3f4f6; padding: 0.2em 0.4em; border-radius: 4px; font-family: monospace; }
.html-preview pre { background: #1f2937; color: #f3f4f6; padding: 16px; border-radius: 8px; overflow-x: auto; }
.html-preview pre code { background: transparent; padding: 0; }
.html-preview blockquote { border-left: 4px solid var(--primary, #00008B); margin: 0; padding-left: 16px; color: #6b7280; }
.html-preview table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.html-preview th, .html-preview td { border: 1px solid #e5e7eb; padding: 8px 12px; text-align: left; }
.html-preview th { background: #f9fafb; font-weight: 600; }
.html-preview img { max-width: 100%; height: auto; }

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .editor-area {
        flex-direction: column;
    }
    .editor-column {
        border-right: none;
        border-bottom: 1px solid var(--border, #e5e7eb);
    }
    .editor-column:last-child {
        border-bottom: none;
    }
    .markdown-input, .html-preview {
        height: 300px;
    }
}