/* Markdown Editor Styles */
.markdown-editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    height: calc(100vh - 400px); /* Adjust based on form above/below */
    min-height: 600px;
}
.markdown-editor-panel {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.markdown-editor-header {
    background: #f3f4f6;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.markdown-toolbar {
    display: flex;
    gap: 5px;
}
.markdown-toolbar button {
    background: white;
    border: 1px solid #d1d5db;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.markdown-toolbar button:hover {
    background: #e5e7eb;
}
.image-upload-status {
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 13px;
    display: none;
}
.image-upload-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
    display: block;
}
.image-upload-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
    display: block;
}
#markdown-input {
    width: 100%;
    height: 100%;
    padding: 15px;
    border: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    overflow-y: auto;
    flex: 1;
}
#markdown-preview {
    height: 100%;
    padding: 15px;
    background: white;
    overflow-y: auto;
    line-height: 1.8;
    flex: 1;
}
#markdown-preview h1 { font-size: 2em; margin-top: 0.5em; margin-bottom: 0.5em; }
#markdown-preview h2 { font-size: 1.5em; margin-top: 0.8em; margin-bottom: 0.5em; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.3em; }
#markdown-preview h3 { font-size: 1.25em; margin-top: 0.8em; margin-bottom: 0.5em; }
#markdown-preview p { margin-bottom: 1em; }
#markdown-preview ul, #markdown-preview ol { margin-bottom: 1em; padding-left: 2em; }
#markdown-preview li { margin-bottom: 0.5em; }
#markdown-preview code { background: #f3f4f6; padding: 2px 6px; border-radius: 3px; font-family: monospace; font-size: 0.9em; }
#markdown-preview pre { background: #1f2937; color: #e5e7eb; padding: 15px; border-radius: 5px; overflow-x: auto; margin-bottom: 1em; }
#markdown-preview pre code { background: none; padding: 0; color: inherit; }
#markdown-preview blockquote { border-left: 4px solid #6366f1; padding-left: 1em; margin-left: 0; color: #6b7280; font-style: italic; }
#markdown-preview a { color: #3b82f6; text-decoration: underline; }
#markdown-preview img { max-width: 100%; height: auto; }
#markdown-preview table { border-collapse: collapse; width: 100%; margin-bottom: 1em; }
#markdown-preview th, #markdown-preview td { border: 1px solid #e5e7eb; padding: 8px 12px; text-align: left; }
#markdown-preview th { background: #f3f4f6; font-weight: 600; }

.markdown-help {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 13px;
}
.markdown-help h4 {
    margin: 0 0 10px 0;
    color: #0369a1;
}
.markdown-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}
.markdown-help code {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
}

@media (max-width: 1200px) {
    .markdown-editor-container {
        grid-template-columns: 1fr;
    }
}