/* === UBX Documentation Page Styles === */

/* Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    padding-top: 65px;
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
    background: var(--color-bg-card);
    border-right: 1px solid var(--color-border);
    padding: 2rem 0;
}

.docs-sidebar-header {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.docs-sidebar-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.docs-version {
    font-size: 0.75rem;
    background: var(--color-blue);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.docs-nav-section {
    padding: 0.75rem 1.5rem;
}

.docs-nav-section h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.docs-nav-section ul {
    list-style: none;
}

.docs-nav-section a {
    display: block;
    padding: 0.4rem 0;
    color: var(--color-text);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.docs-nav-section a:hover {
    color: var(--color-blue);
}

.docs-nav-section a.active {
    color: var(--color-blue);
    border-left-color: var(--color-blue);
    font-weight: 600;
}

/* Main Content */
.docs-content {
    padding: 2rem 3rem 4rem;
    max-width: 900px;
}

.docs-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.docs-back {
    display: inline-block;
    color: var(--color-blue);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.docs-back:hover {
    text-decoration: underline;
}

.docs-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.docs-subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/* Sections */
.docs-section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}

.docs-section:last-of-type {
    border-bottom: none;
}

.docs-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
}

.docs-section h3 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
    color: var(--color-text);
}

.docs-section h4 {
    font-size: 1rem;
    margin: 1.5rem 0 0.75rem;
}

.docs-section p {
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.docs-section ul, .docs-section ol {
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.docs-section li {
    margin-bottom: 0.5rem;
}

/* Code blocks */
.docs-section pre {
    background: #1a1a24;
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.docs-section code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.docs-section pre code {
    color: #e8e8ed;
}

.docs-section p code,
.docs-section li code,
.docs-section td code {
    background: var(--color-bg-alt);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--color-text);
}

/* Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.docs-table th,
.docs-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.docs-table th {
    background: var(--color-bg-alt);
    font-weight: 600;
    color: var(--color-text);
}

.docs-table td {
    color: var(--color-text-muted);
}

.docs-table.compact td,
.docs-table.compact th {
    padding: 0.5rem 0.75rem;
}

/* Features grid */
.docs-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.docs-feature {
    background: var(--color-bg-alt);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.docs-feature h4 {
    font-size: 0.9rem;
    margin: 0 0 0.25rem;
    color: var(--color-text);
}

.docs-feature p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--color-text-muted);
}

/* Info box */
.docs-info-box {
    background: var(--color-bg-alt);
    border-left: 4px solid var(--color-blue);
    padding: 1.25rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.docs-info-box h4 {
    margin: 0 0 0.75rem;
    color: var(--color-blue);
}

.docs-info-box p,
.docs-info-box ul,
.docs-info-box ol {
    margin-bottom: 0.5rem;
}

.docs-info-box p:last-child,
.docs-info-box ul:last-child {
    margin-bottom: 0;
}

/* Callout */
.docs-callout {
    background: linear-gradient(135deg, rgba(59, 159, 216, 0.1) 0%, rgba(59, 159, 216, 0.05) 100%);
    border: 1px solid rgba(59, 159, 216, 0.2);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.docs-callout h4 {
    color: var(--color-blue);
    margin: 0 0 0.5rem;
}

.docs-callout p {
    margin: 0;
}

/* Steps */
.docs-steps {
    list-style: none;
    padding: 0;
    counter-reset: step;
}

.docs-steps li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

.step-content p {
    margin: 0;
}

.step-content pre {
    margin-top: 0.75rem;
}

/* Toast example */
.docs-toast-example {
    background: #2d3748;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: inline-block;
    margin: 1rem 0;
}

/* Need content marker */
.docs-need-content {
    background: rgba(220, 38, 38, 0.1);
    border: 1px dashed #dc2626;
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.docs-need-content.inline {
    display: inline-block;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
}

.need-content-badge {
    display: inline-block;
    background: #dc2626;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.docs-need-content h4 {
    color: #dc2626;
    margin: 0.5rem 0;
}

.docs-need-content p {
    margin: 0;
    font-style: italic;
}

/* Check list */
.docs-check-list {
    list-style: none;
    padding: 0;
}

.docs-check-list li {
    position: relative;
    padding-left: 1.75rem;
}

.docs-check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-blue);
    font-weight: 700;
}

/* Tab info */
.docs-tabs-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.docs-tab-info {
    background: var(--color-bg-alt);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.docs-tab-info h4 {
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

.docs-tab-info p {
    margin: 0;
    font-size: 0.9rem;
}

/* Troubleshoot */
.docs-troubleshoot {
    background: var(--color-bg-alt);
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid var(--color-border);
}

.docs-troubleshoot h4 {
    margin: 0 0 0.75rem;
    color: var(--color-text);
}

.docs-troubleshoot ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* FAQ */
.docs-faq {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--color-border);
}

.docs-faq:last-of-type {
    border-bottom: none;
}

.docs-faq h4 {
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

.docs-faq p {
    margin: 0;
}

/* Changelog */
.docs-changelog {
    margin: 1rem 0;
}

.changelog-version {
    background: var(--color-bg-alt);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
}

.changelog-version h4 {
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.changelog-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: normal;
}

.changelog-version > p {
    margin: 0 0 0.5rem;
    font-style: italic;
}

.changelog-version ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* Footer */
.docs-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.docs-footer p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.docs-footer a {
    color: var(--color-blue);
}

/* Responsive */
@media (max-width: 900px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        display: none;
    }

    .docs-content {
        padding: 2rem 1.5rem;
    }

    .docs-features-grid {
        grid-template-columns: 1fr;
    }

    .docs-tabs-info {
        grid-template-columns: 1fr;
    }
}
