/**
 * LemonX Compatibility Styles
 * Ensures LemonX plugin-edited content displays correctly in the theme.
 * 
 * @package lemonx-starter
 */

/* ========================================
   LemonX Visual Root Base Styles
   ======================================== */

.lemonx-visual-root,
body .lemonx-visual-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* ========================================
   LemonX Headings
   ======================================== */

.lemonx-visual-root h1,
.lemonx-visual-root h2,
.lemonx-visual-root h3,
.lemonx-visual-root h4,
.lemonx-visual-root h5,
.lemonx-visual-root h6 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.2;
    color: #111;
}

.lemonx-visual-root h1 { font-size: 2.5rem; }
.lemonx-visual-root h2 { font-size: 2rem; }
.lemonx-visual-root h3 { font-size: 1.75rem; }
.lemonx-visual-root h4 { font-size: 1.5rem; }
.lemonx-visual-root h5 { font-size: 1.25rem; }
.lemonx-visual-root h6 { font-size: 1rem; }

/* ========================================
   LemonX Paragraph and Base Elements
   ======================================== */

.lemonx-visual-root p {
    margin-bottom: 1em;
    line-height: 1.8;
}

.lemonx-visual-root a {
    color: var(--lx-primary, #10b981);
    text-decoration: none;
    transition: color 0.2s ease;
}

.lemonx-visual-root a:hover {
    color: var(--lx-primary-hover, #059669);
}

/* ========================================
   LemonX Lists
   ======================================== */

.lemonx-visual-root ul,
.lemonx-visual-root ol {
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}

.lemonx-visual-root li {
    margin-bottom: 0.5em;
}

/* ========================================
   LemonX Blockquote
   ======================================== */

.lemonx-visual-root blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border-left: 4px solid var(--lx-primary, #10b981);
    background-color: #f9fafb;
    font-style: italic;
    color: #4b5563;
}

/* ========================================
   LemonX Code
   ======================================== */

.lemonx-visual-root code {
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25em;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.875em;
}

.lemonx-visual-root pre {
    background-color: #1f2937;
    color: #e5e7eb;
    padding: 1em;
    border-radius: 0.5em;
    overflow-x: auto;
    margin: 0 0 1.5em;
}

.lemonx-visual-root pre code {
    background-color: transparent;
    padding: 0;
    color: #e5e7eb;
}

/* ========================================
   LemonX Images
   ======================================== */

.lemonx-visual-root img {
    max-width: 100%;
    height: auto;
    display: block;
}

.lemonx-visual-root figure {
    margin: 1.5em 0;
}

.lemonx-visual-root figcaption {
    font-size: 0.875em;
    color: #6b7280;
    text-align: center;
    margin-top: 0.5em;
}

/* ========================================
   LemonX Tables
   ======================================== */

.lemonx-visual-root table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.lemonx-visual-root th,
.lemonx-visual-root td {
    border: 1px solid #d1d5db;
    padding: 0.75em;
    text-align: left;
}

.lemonx-visual-root th {
    background-color: #f3f4f6;
    font-weight: 600;
}

/* ========================================
   LemonX Loaded State
   ======================================== */

.lemonx-visual-root.loaded {
    opacity: 1;
}

/* ========================================
   LemonX Button Styles
   ======================================== */

.lemonx-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lemonx-btn-primary {
    background-color: var(--lx-primary, #10b981);
    color: white;
}

.lemonx-btn-primary:hover {
    background-color: var(--lx-primary-hover, #059669);
    color: white;
}

/* ========================================
   LemonX Responsive
   ======================================== */

@media (max-width: 768px) {
    .lemonx-visual-root h1 { font-size: 2rem; }
    .lemonx-visual-root h2 { font-size: 1.75rem; }
    .lemonx-visual-root h3 { font-size: 1.5rem; }
}
