/**
 * Documentation page-specific styles
 * Requires: /css/ds4a.css (base styles)
 * Used by: BMS Monitor manual, Quick Start guide, and other documentation pages
 */

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}

body {
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Header */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 32px;
    width: auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent-orange);
}

.breadcrumb svg {
    width: 14px;
    height: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Header Action Buttons */
.quick-start-btn,
.full-manual-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-orange);
    color: var(--bg-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.quick-start-btn:hover,
.full-manual-btn:hover {
    background: #d45520;
}

.quick-start-btn svg,
.full-manual-btn svg {
    width: 16px;
    height: 16px;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* Doc Header */
.doc-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.doc-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.doc-info h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.25rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
}

.doc-info h1 .highlight {
    color: var(--accent-orange);
}

.doc-info .version {
    display: inline-block;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-orange);
    margin-left: 0.5rem;
}

.doc-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
    flex-wrap: wrap;
    overflow-x: auto;
    align-items: center;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s, background 0.2s;
    border-radius: 6px 6px 0 0;
    text-decoration: none;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.tab-btn.active {
    background: var(--bg-secondary);
    color: var(--accent-orange);
    border: 1px solid var(--border-color);
    border-bottom-color: var(--bg-secondary);
    margin-bottom: -1px;
}

/* Panel Header Row (with download section) */
.panel-header-row {
    display: flex;
    align-items: stretch;
    margin: -2rem -2rem 1.5rem -2rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    flex: 1;
}

.panel-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
    color: var(--accent-orange);
    margin: 0;
}

.panel-download-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    border-left: 1px solid var(--border-color);
}

.download-qr {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    object-fit: contain;
    padding: 4px;
}

.download-qr-wrapper {
    text-align: center;
}

.download-qr-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-orange);
    color: var(--bg-primary);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.download-btn:hover {
    background: #d45520;
}

.download-btn svg {
    width: 18px;
    height: 18px;
}

/* Content Panels - Override base panel styles for docs */
.panel {
    padding: 2rem;
    overflow: visible;
}

.panel h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    color: var(--accent-orange);
}

.panel h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 1.5rem 0 0.75rem 0;
}

.panel h3:first-child {
    margin-top: 0;
}

.panel p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.panel p:last-child {
    margin-bottom: 0;
}

.panel ul,
.panel ol {
    margin: 0 0 1rem 1.5rem;
    color: var(--text-secondary);
}

.panel li {
    margin-bottom: 0.5rem;
}

.panel strong {
    color: var(--text-primary);
}

.panel code {
    background: var(--bg-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: var(--accent-orange);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

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

.feature-card h4 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-card h4 .icon {
    font-size: 1.25rem;
}

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

/* Info Boxes */
.info-box {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.info-box .icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.info-box p {
    margin: 0;
}

.info-box.tip {
    background: rgba(45, 156, 219, 0.1);
    border: 1px solid rgba(45, 156, 219, 0.3);
}

.info-box.tip .icon {
    color: var(--accent-blue);
}

.info-box.warning {
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.info-box.warning .icon {
    color: var(--accent-yellow);
}

.info-box.danger {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.info-box.danger .icon {
    color: var(--accent-red);
}

.info-box.success {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.info-box.success .icon {
    color: var(--accent-green);
}

/* Tables (docs-specific styling) */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 1rem 0;
}

/* Screenshot Panel */
.screenshot-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.screenshot-panel .screenshot {
    width: 200px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Screenshot Placeholder */
.screenshot-placeholder {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    margin: 1.5rem 0;
}

.screenshot-placeholder .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.screenshot-placeholder p {
    color: var(--text-muted);
    margin: 0;
}

.screenshot-placeholder .label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Status Indicators */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-green {
    background: rgba(39, 174, 96, 0.2);
    color: var(--accent-green);
}

.status-red {
    background: rgba(231, 76, 60, 0.2);
    color: var(--accent-red);
}

.status-orange {
    background: rgba(255, 107, 44, 0.2);
    color: var(--accent-orange);
}

/* Section Navigation */
.section-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.section-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.section-nav a:hover {
    color: var(--accent-orange);
}

.section-nav a svg {
    width: 18px;
    height: 18px;
}

.section-nav .next {
    margin-left: auto;
}

/* Quick Start Banner */
.quick-start-banner {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.quick-start-banner .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.quick-start-banner h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

.quick-start-banner h1 .highlight {
    color: var(--accent-orange);
}

.quick-start-banner p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Step Cards */
.step-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.step-header-row {
    display: flex;
    align-items: stretch;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    flex: 1;
}

.step-download-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    border-left: 1px solid var(--border-color);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--accent-orange);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.step-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}

.step-content {
    padding: 1.5rem;
}

.step-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.step-content p:last-child {
    margin-bottom: 0;
}

.step-content ul,
.step-content ol {
    margin: 0 0 1rem 1.5rem;
    color: var(--text-secondary);
}

.step-content li {
    margin-bottom: 0.5rem;
}

.step-content strong {
    color: var(--text-primary);
}

/* Quick Reference */
.quick-ref {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.quick-ref h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-orange);
}

.quick-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-ref-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.quick-ref-item h4 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-ref-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.cta-section h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-orange);
    color: var(--bg-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.cta-btn:hover {
    background: #d45520;
}

.cta-btn svg {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 900px) {
    .panel-header-row {
        flex-direction: column;
    }

    .panel-download-section {
        border-left: none;
        border-top: 1px solid var(--border-color);
        justify-content: center;
    }

    .step-header-row {
        flex-direction: column;
    }

    .step-download-section {
        border-left: none;
        border-top: 1px solid var(--border-color);
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .doc-header {
        flex-direction: column;
        text-align: center;
    }

    .tabs {
        justify-content: flex-start;
    }

    .tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.75rem;
    }

    header {
        flex-direction: column;
        gap: 1rem;
    }

    .breadcrumb {
        border-left: none;
        padding-left: 0;
    }

    .panel {
        padding: 1.25rem;
    }

    main {
        padding: 1rem;
    }

    .quick-start-banner {
        padding: 1.5rem;
    }

    .quick-start-banner h1 {
        font-size: 2rem;
    }

    .step-content {
        padding: 1rem;
    }
}

@media (max-width: 600px) {
    .screenshot-panel .screenshot {
        width: 100%;
        max-width: 250px;
    }
}
