/**
 * Work Suite Content Styles
 * 
 * Base CSS styles for content elements that use the theme variables.
 * Include this CSS in your app, then apply a theme using WorkSuiteThemes.apply()
 * 
 * All styles use --content-* CSS variables set by content-themes.js
 */

/* ==================== CONTENT CONTAINER ==================== */

.ws-content {
    font-family: var(--content-font-body, 'Inter', sans-serif);
    color: var(--content-text, #e8e8e8);
    background: var(--content-bg, #0f0f23);
    line-height: var(--content-body-line-height, 1.7);
}

/* ==================== HEADINGS ==================== */

.ws-content h1,
.ws-content h2,
.ws-content h3,
.ws-content h4,
.ws-content h5,
.ws-content h6 {
    font-family: var(--content-font-heading, 'Space Grotesk', sans-serif);
    font-weight: var(--content-heading-weight, 700);
    letter-spacing: var(--content-heading-letter-spacing, -0.02em);
    color: var(--content-heading, #ffffff);
    line-height: 1.3;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.ws-content h1:first-child,
.ws-content h2:first-child,
.ws-content h3:first-child {
    margin-top: 0;
}

.ws-content h1 {
    font-size: 2.5em;
}

.ws-content h2 {
    font-size: 2em;
}

.ws-content h3 {
    font-size: 1.5em;
}

.ws-content h4 {
    font-size: 1.25em;
}

.ws-content h5 {
    font-size: 1.1em;
    color: var(--content-muted, #8892b0);
}

.ws-content h6 {
    font-size: 1em;
    color: var(--content-muted, #8892b0);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==================== PARAGRAPHS & TEXT ==================== */

.ws-content p {
    margin-top: 0;
    margin-bottom: var(--content-paragraph-spacing, 1.25em);
}

.ws-content strong,
.ws-content b {
    font-weight: 600;
    color: var(--content-heading, #ffffff);
}

.ws-content em,
.ws-content i {
    font-style: italic;
}

.ws-content small {
    font-size: 0.875em;
    color: var(--content-muted, #8892b0);
}

.ws-content mark {
    background: var(--content-accent, #e94560);
    color: white;
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

/* ==================== LINKS ==================== */

.ws-content a {
    color: var(--content-link, #64ffda);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.ws-content a:hover {
    border-bottom-color: var(--content-link, #64ffda);
}

/* ==================== LISTS ==================== */

.ws-content ul,
.ws-content ol {
    margin: 0 0 var(--content-paragraph-spacing, 1.25em) 0;
    padding-left: 1.5em;
}

.ws-content li {
    margin-bottom: 0.5em;
}

.ws-content li > ul,
.ws-content li > ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.ws-content ul {
    list-style-type: disc;
}

.ws-content ul ul {
    list-style-type: circle;
}

.ws-content ul ul ul {
    list-style-type: square;
}

.ws-content ol {
    list-style-type: decimal;
}

/* ==================== CODE ==================== */

.ws-content code {
    font-family: var(--content-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.9em;
    background: var(--content-code-bg, rgba(255, 255, 255, 0.08));
    color: var(--content-code-text, #e8e8e8);
    padding: 0.2em 0.4em;
    border-radius: calc(var(--content-border-radius, 8px) / 2);
}

.ws-content pre {
    font-family: var(--content-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.9em;
    background: var(--content-code-bg, rgba(255, 255, 255, 0.08));
    color: var(--content-code-text, #e8e8e8);
    padding: 1em 1.25em;
    border-radius: var(--content-border-radius, 8px);
    overflow-x: auto;
    margin: 0 0 var(--content-paragraph-spacing, 1.25em) 0;
    line-height: 1.5;
}

.ws-content pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
    border-radius: 0;
}

/* ==================== BLOCKQUOTES ==================== */

.ws-content blockquote {
    margin: 0 0 var(--content-paragraph-spacing, 1.25em) 0;
    padding: 1em 1.5em;
    border-left: 4px solid var(--content-blockquote-border, #e94560);
    background: var(--content-blockquote-bg, rgba(233, 69, 96, 0.1));
    border-radius: 0 var(--content-border-radius, 8px) var(--content-border-radius, 8px) 0;
    font-style: italic;
    color: var(--content-muted, #8892b0);
}

.ws-content blockquote p:last-child {
    margin-bottom: 0;
}

.ws-content blockquote cite {
    display: block;
    margin-top: 0.5em;
    font-size: 0.9em;
    font-style: normal;
    color: var(--content-muted, #8892b0);
}

.ws-content blockquote cite::before {
    content: '— ';
}

/* ==================== TABLES ==================== */

.ws-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 var(--content-paragraph-spacing, 1.25em) 0;
    font-size: 0.95em;
}

.ws-content th,
.ws-content td {
    padding: 0.75em 1em;
    text-align: left;
    border-bottom: 1px solid var(--content-table-border, #2a2a4a);
}

.ws-content th {
    font-weight: 600;
    color: var(--content-heading, #ffffff);
    background: var(--content-table-header-bg, rgba(255, 255, 255, 0.05));
}

.ws-content tr:hover td {
    background: var(--content-table-header-bg, rgba(255, 255, 255, 0.05));
}

/* ==================== HORIZONTAL RULE ==================== */

.ws-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--content-accent, #e94560),
        var(--content-accent-alt, #ff6b6b),
        transparent
    );
    margin: 2em 0;
    border-radius: 1px;
}

/* ==================== IMAGES ==================== */

.ws-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--content-border-radius, 8px);
    margin: 1em 0;
}

.ws-content figure {
    margin: 0 0 var(--content-paragraph-spacing, 1.25em) 0;
}

.ws-content figcaption {
    font-size: 0.9em;
    color: var(--content-muted, #8892b0);
    text-align: center;
    margin-top: 0.5em;
}

/* ==================== DEFINITION LISTS ==================== */

.ws-content dl {
    margin: 0 0 var(--content-paragraph-spacing, 1.25em) 0;
}

.ws-content dt {
    font-weight: 600;
    color: var(--content-heading, #ffffff);
    margin-top: 1em;
}

.ws-content dt:first-child {
    margin-top: 0;
}

.ws-content dd {
    margin-left: 1.5em;
    color: var(--content-muted, #8892b0);
}

/* ==================== KEYBOARD & ABBREVIATIONS ==================== */

.ws-content kbd {
    font-family: var(--content-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.85em;
    background: var(--content-code-bg, rgba(255, 255, 255, 0.08));
    color: var(--content-text, #e8e8e8);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    border: 1px solid var(--content-table-border, #2a2a4a);
    box-shadow: 0 2px 0 var(--content-table-border, #2a2a4a);
}

.ws-content abbr {
    text-decoration: underline dotted;
    cursor: help;
}

/* ==================== CHECKBOXES (for task lists) ==================== */

.ws-content input[type="checkbox"] {
    appearance: none;
    width: 1.1em;
    height: 1.1em;
    border: 2px solid var(--content-accent, #e94560);
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 0.5em;
    cursor: pointer;
    position: relative;
}

.ws-content input[type="checkbox"]:checked {
    background: var(--content-accent, #e94560);
}

.ws-content input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75em;
    font-weight: bold;
}

/* ==================== ALERTS / CALLOUTS ==================== */

.ws-content .callout,
.ws-content .alert {
    padding: 1em 1.25em;
    border-radius: var(--content-border-radius, 8px);
    margin: 0 0 var(--content-paragraph-spacing, 1.25em) 0;
    border-left: 4px solid var(--content-accent, #e94560);
    background: var(--content-blockquote-bg, rgba(233, 69, 96, 0.1));
}

.ws-content .callout-info,
.ws-content .alert-info {
    border-left-color: var(--content-link, #64ffda);
    background: rgba(100, 255, 218, 0.1);
}

.ws-content .callout-warning,
.ws-content .alert-warning {
    border-left-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.ws-content .callout-success,
.ws-content .alert-success {
    border-left-color: #34d399;
    background: rgba(52, 211, 153, 0.1);
}

.ws-content .callout-error,
.ws-content .alert-error {
    border-left-color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

/* ==================== FOOTNOTES ==================== */

.ws-content .footnote {
    font-size: 0.85em;
    color: var(--content-muted, #8892b0);
}

.ws-content .footnote-ref {
    font-size: 0.75em;
    vertical-align: super;
    color: var(--content-accent, #e94560);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .ws-content h1 {
        font-size: 2em;
    }

    .ws-content h2 {
        font-size: 1.5em;
    }

    .ws-content h3 {
        font-size: 1.25em;
    }

    .ws-content pre {
        font-size: 0.85em;
        padding: 0.75em 1em;
    }

    .ws-content table {
        font-size: 0.9em;
    }

    .ws-content th,
    .ws-content td {
        padding: 0.5em 0.75em;
    }
}

/* ==================== PRINT STYLES ==================== */

@media print {
    .ws-content {
        background: white !important;
        color: black !important;
    }

    .ws-content h1,
    .ws-content h2,
    .ws-content h3,
    .ws-content h4,
    .ws-content h5,
    .ws-content h6 {
        color: black !important;
    }

    .ws-content a {
        color: black !important;
        text-decoration: underline;
    }

    .ws-content pre,
    .ws-content code {
        background: #f4f4f4 !important;
        color: black !important;
    }
}

