/* MBXRemote Documentation Styles v1.0.25.1221 */

/* Cross-links (right side of nav) */
.cross-links {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.cross-links a {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(233, 69, 96, 0.15);
    color: #e94560;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid rgba(233, 69, 96, 0.3);
}

.cross-links a:hover {
    background: rgba(233, 69, 96, 0.3);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Base styles */
:root {
    --primary-color: #0066cc;
    --primary-hover: #0052a3;
    --accent-color: #5dade2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #e11d48;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --bg-primary: #ffffff;
    --bg-secondary: #f4f4f4;
    --bg-card: #f8fafc;
    --border-color: #e0e0e0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #5dade2;
        --primary-hover: #4a90e2;
        --text-primary: #f4f4f4;
        --text-secondary: #cbd5e0;
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-card: #2d3748;
        --border-color: #4a5568;
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Header */
header {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    height: 70px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

header #logo {
    display: inline-block;
    flex-shrink: 0;
}

header #logo img {
    height: 50px;
    width: 55px;
    display: block;
}

header h1 {
    margin: 0;
    display: inline-block;
    font-size: 1.5em;
    padding-left: 15px;
    line-height: 1.5;
}

/* MBXRemote Local Navigation (scoped to avoid conflict with Halrad global menu) */
nav.mbx-nav {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
    display: flex;
    align-items: center;
}

nav.mbx-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

nav.mbx-nav li {
    margin: 0;
}

nav.mbx-nav a {
    display: inline-block;
    padding: 8px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

nav.mbx-nav a:hover {
    background: var(--primary-color);
    color: white;
}

nav.mbx-nav a.active {
    background: var(--primary-color);
    color: white;
}

/* Content */
.content {
    padding: 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.content p, .content ul, .content ol {
    text-align: left;
}

.content ul, .content ol {
    margin-left: 0;
    padding-left: 20px;
}

/* Typography */
h1.page-title {
    color: var(--text-primary);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
    font-size: 2em;
    margin-top: 0;
}

h2 {
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    margin-top: 40px;
}

h3 {
    color: var(--text-primary);
    margin-top: 30px;
}

h4 {
    color: var(--text-secondary);
    margin-top: 20px;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Polaroid hero card */
.polaroid {
    width: 320px;
    margin: 30px auto;
    background-color: white;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    padding: 15px 15px 10px 15px;
    transform: rotate(-2deg);
    transition: transform 0.3s;
}

.polaroid:hover {
    transform: rotate(0deg);
}

.polaroid-images {
    width: 100%;
    height: 140px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
}

.polaroid-images img {
    height: 120px;
    width: 120px;
    object-fit: contain;
}

.polaroid .container {
    text-align: center;
    padding: 10px 20px;
    background-color: white;
    color: #333;
}

.polaroid .container p {
    display: inline-block;
    margin: 4px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: #333;
}

/* Feature boxes */
.feature-box {
    background: var(--bg-card);
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.feature-box h3 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Feature grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.feature-card p {
    margin: 24px 0 0 0;
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.5;
}

/* Download section */
.download-section {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.download-section h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.download-button {
    display: inline-block;
    background: var(--primary-color);
    color: white !important;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none !important;
    font-weight: bold;
    margin: 10px;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
}

.download-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Tech specs */
.tech-specs {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: var(--shadow-sm);
}

.tech-specs h3 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Note/warning box */
.note {
    background: #fff3cd;
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.note strong {
    color: #664d03;
}

@media (prefers-color-scheme: dark) {
    .note {
        background: #3a2f0a;
    }
    .note strong {
        color: #ffd54f;
    }
}

/* Critical warning/stop box */
.warning-critical {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 3px solid var(--danger-color);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.2);
}

.warning-critical h3 {
    color: var(--danger-color);
    margin-top: 0;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-critical p {
    color: #991b1b;
    font-size: 1.05em;
    line-height: 1.6;
}

.warning-critical a {
    color: var(--danger-color);
    font-weight: 600;
}

.warning-critical .warning-icon {
    font-size: 2em;
}

@media (prefers-color-scheme: dark) {
    .warning-critical {
        background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%);
        border-color: #f87171;
    }
    .warning-critical h3 {
        color: #fca5a5;
    }
    .warning-critical p {
        color: #fecaca;
    }
    .warning-critical a {
        color: #f87171;
    }
}

/* Runtime requirement callout */
.runtime-requirement {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    text-align: left;
}

.runtime-requirement h4 {
    color: #856404;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1em;
}

.runtime-requirement p {
    color: #856404;
    margin-bottom: 10px;
    font-size: 0.9em;
}

@media (prefers-color-scheme: dark) {
    .runtime-requirement {
        background: #3a2f0a;
        border-color: #d69e2e;
    }
    .runtime-requirement h4,
    .runtime-requirement p {
        color: #faf089;
    }
}

/* Code blocks */
.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 4px;
    padding: 0;
    margin: 15px 0;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    overflow-x: auto;
    box-shadow: var(--shadow-md);
}

.code-block pre {
    padding: 20px;
    margin: 0;
    white-space: pre;
    overflow-x: auto;
    line-height: 1.5;
}

code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding: 12px;
    text-align: left;
}

table td {
    color: var(--text-primary);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 12px;
}

table tr:hover td {
    background: var(--bg-secondary);
}

/* Keyboard keys */
kbd {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

/* Screenshots */
.screenshot {
    max-width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    margin: 10px 0;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.screenshot-container {
    text-align: center;
}

.screenshot-container h4 {
    margin-bottom: 10px;
}

/* Release notes */
.release-notes {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--success-color);
}

.release-notes h3 {
    color: var(--success-color);
    margin-top: 0;
}

.release-notes ul {
    margin: 10px 0;
}

.release-notes li {
    margin-bottom: 8px;
}

/* Version badge */
.version-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Documentation nav cards */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.doc-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    display: block;
}

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    text-decoration: none;
}

.doc-card h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.doc-card p {
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Back button */
.back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.back-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

footer img {
    width: 100px;
    opacity: 0.5;
    margin-bottom: 10px;
}

/* Dev Test Mode / Cheat Sheet Box (dark background box) */
.dev-cheatsheet {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dev-cheatsheet h3 {
    color: #93c5fd;
    margin-top: 0;
}

.dev-cheatsheet th {
    color: #93c5fd;
    background: rgba(30, 41, 59, 0.8);
}

.dev-cheatsheet td {
    color: #e0f2fe;
    background: transparent;
    border-color: #334155;
}

.dev-cheatsheet td strong {
    color: #bae6fd;
}

.dev-cheatsheet td code {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.2);
}

.dev-cheatsheet p {
    color: #94a3b8;
}

/* Feature callout boxes with consistent theming */
.callout-orange {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.callout-orange h3 {
    color: #92400e;
    margin-top: 0;
}

.callout-orange p,
.callout-orange li {
    color: #78350f;
}

@media (prefers-color-scheme: dark) {
    .callout-orange {
        background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
        border-color: #fbbf24;
    }
    .callout-orange h3 {
        color: #fcd34d;
    }
    .callout-orange p,
    .callout-orange li {
        color: #fef3c7;
    }
}

.callout-blue {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.callout-blue h3 {
    color: #1e40af;
    margin-top: 0;
}

.callout-blue p,
.callout-blue li {
    color: #1e3a8a;
}

@media (prefers-color-scheme: dark) {
    .callout-blue {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
        border-color: #60a5fa;
    }
    .callout-blue h3 {
        color: #93c5fd;
    }
    .callout-blue p,
    .callout-blue li {
        color: #dbeafe;
    }
}

.callout-green {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.callout-green h3 {
    color: #065f46;
    margin-top: 0;
}

.callout-green p,
.callout-green li {
    color: #064e3b;
}

@media (prefers-color-scheme: dark) {
    .callout-green {
        background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
        border-color: #34d399;
    }
    .callout-green h3 {
        color: #6ee7b7;
    }
    .callout-green p,
    .callout-green li {
        color: #d1fae5;
    }
}

/* JSON syntax highlighting - works in both themes */
.json-comment { color: #6a9955; }
.json-key { color: #9cdcfe; }
.json-string { color: #ce9178; }
.json-number { color: #b5cea8; }
.json-bool { color: #569cd6; }

/* Success note (green background) */
.note-success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.note-success strong {
    color: #2e7d32;
}

@media (prefers-color-scheme: dark) {
    .note-success {
        background-color: #1b4332;
        border-color: #4caf50;
    }
    .note-success strong {
        color: #81c784;
    }
    .note-success,
    .note-success p {
        color: #c8e6c9;
    }
}

/* Info note (blue background) */
.note-info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.note-info strong {
    color: #1565c0;
}

.note-info a {
    color: #1976d2;
}

@media (prefers-color-scheme: dark) {
    .note-info {
        background-color: #1e3a5f;
        border-color: #2196f3;
    }
    .note-info strong {
        color: #90caf9;
    }
    .note-info a {
        color: #64b5f6;
    }
    .note-info,
    .note-info p {
        color: #bbdefb;
    }
}

/* Caption text */
.caption {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        height: auto;
        min-height: 60px;
    }

    header h1 {
        font-size: 1.1em;
    }

    .content {
        padding: 15px 20px;
    }

    nav.mbx-nav {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 15px;
        gap: 10px;
    }

    nav.mbx-nav ul {
        width: 100%;
        justify-content: flex-start;
        gap: 2px;
    }

    nav.mbx-nav a {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .cross-links {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
    }

    .code-block {
        font-size: 12px;
    }

    .polaroid {
        width: 90%;
        max-width: 320px;
    }
}
