/* User Guide Specific Styles */

/* Header modifications for guide page */
.header-back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-header);
    transition: opacity 0.2s ease;
}

.header-back-link:hover {
    opacity: 0.8;
}

.header-back-link h1 {
    font-size: 24px;
    margin: 0;
}

.header-back-link svg {
    color: var(--text-header-muted);
}

.header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 500;
    color: var(--text-header-muted);
}

/* Guide Layout */
.guide-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Guide Sidebar Navigation */
.guide-sidebar {
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
    padding: 24px 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.guide-nav-header {
    padding: 0 24px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.guide-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-nav-list a {
    display: block;
    padding: 10px 24px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.guide-nav-list a:hover {
    background-color: var(--bg-hover);
    color: var(--accent-primary);
}

.guide-nav-list a.active {
    background-color: var(--bg-hover);
    border-left-color: var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 500;
}

/* Guide Content */
.guide-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 60px;
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.guide-content article {
    max-width: 800px;
    margin: 0 auto;
}

/* Section Styling */
.guide-section {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
}

.guide-section:last-child {
    border-bottom: none;
}

.guide-section h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-primary);
}

.guide-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 28px 0 12px;
}

.guide-section h3:first-of-type {
    margin-top: 0;
}

.guide-section p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.guide-section ul,
.guide-section ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.guide-section li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.guide-section li ul,
.guide-section li ol {
    margin-top: 8px;
    margin-bottom: 8px;
}

.guide-section strong {
    font-weight: 600;
    color: var(--text-primary);
}

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

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

.guide-table th {
    background-color: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.guide-table td {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.guide-table tr:hover td {
    background-color: var(--bg-hover);
}

/* Code blocks */
.guide-code {
    display: block;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 12px 0 16px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: auto;
    white-space: pre;
}

code {
    background-color: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: var(--accent-primary);
}

/* Keyboard shortcuts */
kbd {
    display: inline-block;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 2px 0 var(--border-color);
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.status-indicator.connected {
    background-color: var(--accent-success);
}

.status-indicator.disconnected {
    background-color: var(--accent-danger);
}

/* Troubleshooting items */
.troubleshoot-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.troubleshoot-item h3 {
    margin: 0 0 12px 0 !important;
    color: var(--text-primary);
}

.troubleshoot-item ul {
    margin-bottom: 0;
}

/* Attribution list */
.attribution-list {
    columns: 2;
    column-gap: 40px;
}

.attribution-list li {
    break-inside: avoid;
}

/* Scrollbar styling */
.guide-sidebar::-webkit-scrollbar,
.guide-content::-webkit-scrollbar {
    width: 8px;
}

.guide-sidebar::-webkit-scrollbar-track,
.guide-content::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

.guide-sidebar::-webkit-scrollbar-thumb,
.guide-content::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

.guide-sidebar::-webkit-scrollbar-thumb:hover,
.guide-content::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .guide-content {
        padding: 32px 40px;
    }
}

@media (max-width: 768px) {
    .guide-layout {
        flex-direction: column;
    }

    .guide-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px 0;
        max-height: 200px;
    }

    .guide-nav-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 16px;
    }

    .guide-nav-list a {
        padding: 8px 12px;
        border-left: none;
        border-radius: 4px;
        background-color: var(--bg-tertiary);
    }

    .guide-nav-list a.active {
        border-left: none;
        background-color: var(--accent-primary);
        color: white;
    }

    .guide-content {
        padding: 24px 20px;
    }

    .guide-section h2 {
        font-size: 24px;
    }

    .attribution-list {
        columns: 1;
    }

    .header-title {
        display: none;
    }
}
