/* Markdown Editor Layout Styles */

.editor-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
    height: calc(100vh - 280px);
    min-height: 500px;
}

@media (min-width: 992px) {
    .editor-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

.pane-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .pane-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.pane-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pane-actions {
    display: flex;
    gap: 0.5rem;
}

.pane-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

[data-theme="light"] .pane-btn {
    border-color: rgba(0, 0, 0, 0.15);
}

.pane-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary, #f97316);
}

[data-theme="light"] .pane-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Editor Input */
.editor-textarea {
    flex: 1;
    width: 100%;
    height: 100%;
    padding: 1.25rem;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: none;
    overflow-y: auto;
}

/* Live Preview */
.preview-container {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Styled Markdown Preview Output */
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
    font-family: 'Barlow Condensed', sans-serif;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}
.markdown-body h1 { font-size: 1.8rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 0.3rem; }
.markdown-body h2 { font-size: 1.4rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 0.2rem; }
.markdown-body h3 { font-size: 1.2rem; }

[data-theme="light"] .markdown-body h1 { border-color: rgba(0, 0, 0, 0.1); }
[data-theme="light"] .markdown-body h2 { border-color: rgba(0, 0, 0, 0.05); }

.markdown-body p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.markdown-body li {
    margin-bottom: 0.35rem;
}

.markdown-body code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.88rem;
}

[data-theme="light"] .markdown-body code {
    background: rgba(0, 0, 0, 0.06);
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .markdown-body pre {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    color: var(--text-primary);
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary, #f97316);
    padding-left: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.markdown-body th, .markdown-body td {
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .markdown-body th, [data-theme="light"] .markdown-body td {
    border-color: rgba(0, 0, 0, 0.1);
}

.markdown-body th {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .markdown-body th {
    background: rgba(0, 0, 0, 0.03);
}

.markdown-body img {
    max-width: 100%;
    border-radius: 6px;
    margin-bottom: 1rem;
}
