/* LibreWXR Documentation - Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #e0e0e0;
    background: #0f1117;
    line-height: 1.6;
}

/* ── Header ─────────────────────────────── */
header {
    background: #161822;
    border-bottom: 1px solid #2a2d3a;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.logo span {
    color: #4ea8de;
}

.header-links {
    display: flex;
    gap: 20px;
}

.header-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.header-links a:hover,
.header-links a.active {
    color: #4ea8de;
}

/* ── Layout ─────────────────────────────── */
.doc-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 65px - 73px);
}

/* ── Sidebar ────────────────────────────── */
.doc-sidebar {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid #2a2d3a;
    padding: 24px 16px;
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
}

.doc-sidebar h3 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 12px;
    padding: 0 8px;
}

.doc-sidebar ul {
    list-style: none;
    margin-bottom: 24px;
}

.doc-sidebar ul li a {
    display: block;
    padding: 5px 8px;
    font-size: 14px;
    color: #9ca3af;
    text-decoration: none;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.doc-sidebar ul li a:hover {
    color: #e0e0e0;
    background: rgba(78, 168, 222, 0.08);
}

.doc-sidebar ul li a.active {
    color: #4ea8de;
    background: rgba(78, 168, 222, 0.12);
}

/* ── Main Content ───────────────────────── */
.doc-content {
    flex: 1;
    min-width: 0;
    padding: 32px 40px 60px;
}

.doc-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.doc-content .subtitle {
    font-size: 16px;
    color: #9ca3af;
    margin-bottom: 32px;
}

.doc-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a2d3a;
}

.doc-content h2:first-of-type {
    margin-top: 0;
}

.doc-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #e0e0e0;
    margin-top: 32px;
    margin-bottom: 12px;
}

.doc-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #d0d4e0;
    margin-top: 24px;
    margin-bottom: 8px;
}

.doc-content p {
    font-size: 16px;
    color: #b0b8c8;
    line-height: 1.7;
    margin-bottom: 16px;
}

.doc-content ul, .doc-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.doc-content li {
    font-size: 16px;
    color: #b0b8c8;
    line-height: 1.7;
    margin-bottom: 4px;
}

.doc-content a {
    color: #4ea8de;
    text-decoration: none;
}

.doc-content a:hover {
    text-decoration: underline;
}

.doc-content strong {
    color: #e0e0e0;
}

.doc-content hr {
    border: none;
    border-top: 1px solid #2a2d3a;
    margin: 40px 0;
}

/* ── Code ────────────────────────────────── */
code {
    background: #1e2030;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #d4d8e8;
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
}

pre {
    background: #1e2030;
    border: 1px solid #2a2d3a;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 12px 0 20px;
}

pre code {
    background: none;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* ── Tables ──────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 20px;
    font-size: 14px;
}

th {
    text-align: left;
    padding: 10px 12px;
    background: #161822;
    color: #e0e0e0;
    font-weight: 600;
    border-bottom: 2px solid #2a2d3a;
}

td {
    padding: 8px 12px;
    border-bottom: 1px solid #1e2030;
    color: #b0b8c8;
}

tr:hover td {
    background: rgba(78, 168, 222, 0.04);
}

/* Property tables (key-value pairs for config settings) */
table.prop-table {
    width: auto;
    margin: 8px 0 16px;
}

table.prop-table td {
    padding: 4px 12px 4px 0;
    border: none;
}

table.prop-table td:first-child {
    color: #6b7280;
    font-size: 13px;
    white-space: nowrap;
}

table.prop-table td:last-child {
    color: #e0e0e0;
}

/* ── Docs Index Cards ────────────────────── */
.doc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.doc-card {
    background: #161822;
    border: 1px solid #2a2d3a;
    border-radius: 10px;
    padding: 24px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
    display: block;
}

.doc-card:hover {
    border-color: #4ea8de;
    background: #1a1c28;
    text-decoration: none;
}

.doc-card h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 8px;
}

.doc-card p {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.5;
    margin: 0;
}

/* ── Footer ─────────────────────────────── */
footer {
    border-top: 1px solid #2a2d3a;
    padding: 24px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

footer a {
    color: #4ea8de;
    text-decoration: none;
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 860px) {
    .doc-layout {
        flex-direction: column;
    }

    .doc-sidebar {
        width: 100%;
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #2a2d3a;
        padding: 16px 24px;
    }

    .doc-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-bottom: 8px;
    }

    .doc-content {
        padding: 24px;
    }

    table {
        font-size: 13px;
    }

    th, td {
        padding: 6px 8px;
    }
}
