/* RadioMV API Documentation Styles */
/* Minimal, clean design inspired by modern API docs */

:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f7f8fa;
    --color-bg-code: #1e1e1e;
    --color-text: #1a1a1a;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-accent: #3b82f6;
    --color-accent-hover: #2563eb;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    --max-width: 1200px;
    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    border-right: 1px solid var(--color-border);
    padding: 32px 24px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    display: block;
    margin-bottom: 32px;
}

.sidebar-logo span {
    color: var(--color-text-muted);
    font-weight: 400;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.15s ease;
}

.sidebar nav a:hover {
    color: var(--color-text);
    background: var(--color-bg-alt);
}

.sidebar nav a.active {
    color: var(--color-accent);
    background: rgba(59, 130, 246, 0.1);
}

.nav-section {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    padding: 24px 12px 8px;
}

/* Main Content */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 48px 64px;
    max-width: calc(100% - var(--sidebar-width));
}

/* Typography */
h1 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 48px;
    margin-bottom: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

h2:first-of-type {
    margin-top: 32px;
    border-top: none;
    padding-top: 0;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
}

p {
    margin-bottom: 16px;
    color: var(--color-text);
}

.lead {
    font-size: 18px;
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Code */
code {
    font-family: var(--font-mono);
    font-size: 14px;
    background: var(--color-bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
}

pre {
    background: var(--color-bg-code);
    color: #e5e7eb;
    padding: 20px 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0 24px;
}

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

/* Syntax highlighting */
.hljs-keyword { color: #c678dd; }
.hljs-string { color: #98c379; }
.hljs-number { color: #d19a66; }
.hljs-attr { color: #e06c75; }
.hljs-literal { color: #56b6c2; }
.hljs-comment { color: #5c6370; }

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

th, td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}

th {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

/* Cards */
.card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px;
    margin: 16px 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.card p {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.card a {
    font-size: 14px;
    font-weight: 500;
}

/* Badges */
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-get {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.badge-required {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

.badge-optional {
    background: rgba(107, 114, 128, 0.1);
    color: var(--color-text-muted);
}

/* Endpoint */
.endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-bg-alt);
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0 24px;
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.endpoint:hover {
    background: var(--color-border);
}

.endpoint code {
    background: none;
    padding: 0;
}

.endpoint::after {
    content: 'Click to copy';
    position: absolute;
    right: 16px;
    font-size: 11px;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.endpoint:hover::after {
    opacity: 1;
}

.endpoint.copied::after {
    content: 'Copied!';
    color: var(--color-success);
    opacity: 1;
}

/* Callouts */
.callout {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 24px 0;
    font-size: 14px;
}

.callout-info {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--color-accent);
}

.callout-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--color-warning);
}

.callout-success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--color-success);
}

.callout strong {
    display: block;
    margin-bottom: 4px;
}

/* Lists */
ul, ol {
    margin: 16px 0;
    padding-left: 24px;
}

li {
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
        max-width: 100%;
        padding: 32px 24px;
    }

    .mobile-nav {
        display: block;
        padding: 16px 24px;
        border-bottom: 1px solid var(--color-border);
        position: sticky;
        top: 0;
        background: var(--color-bg);
        z-index: 100;
    }
}

@media (min-width: 901px) {
    .mobile-nav {
        display: none;
    }
}

/* Anchor links */
h2[id], h3[id] {
    scroll-margin-top: 24px;
}

/* Parameter list */
.param-list {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0 24px;
}

.param {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.param:last-child {
    border-bottom: none;
}

.param-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.param-name {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
}

.param-type {
    font-size: 12px;
    color: var(--color-text-muted);
}

.param-desc {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Footer */
.footer {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    font-size: 14px;
    color: var(--color-text-muted);
}
