/* ========== YogaBot Live Documentation Styles ========== */
/* Modern, accessible documentation design */

:root {
    /* Documentation specific colors */
    --docs-bg: #fafbfc;
    --docs-sidebar-bg: #ffffff;
    --docs-content-bg: #ffffff;
    --docs-border: #e1e5e9;
    --docs-text: #2d3748;
    --docs-text-light: #718096;
    --docs-accent: #7C3AED;
    --docs-accent-light: #8B5CF6;
    --docs-success: #10B981;
    --docs-warning: #F59E0B;
    --docs-error: #EF4444;
    --docs-code-bg: #f7fafc;
    --docs-code-border: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-mono: 'JetBrains Mono', 'Monaco', 'Courier New', monospace;

    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;
    --content-max-width: 800px;
}

/* ========== Base Documentation Styles ========== */
.docs-page {
    background-color: var(--docs-bg);
    color: var(--docs-text);
    line-height: 1.6;
    font-family: var(--font-primary);
}

/* ========== Documentation Header ========== */
.docs-header {
    background: var(--docs-content-bg);
    border-bottom: 1px solid var(--docs-border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

.docs-nav {
    height: 100%;
}

.docs-nav .container {
    height: 100%;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1rem;
}

.docs-nav .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--docs-text);
    font-weight: 600;
    font-size: 1.125rem;
}

.docs-nav .logo svg {
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--docs-text-light);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--docs-accent);
    border-bottom-color: var(--docs-accent);
}

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search input {
    width: 240px;
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid var(--docs-border);
    border-radius: 0.5rem;
    background: var(--docs-bg);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--docs-accent);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.nav-search svg {
    position: absolute;
    right: 0.75rem;
    color: var(--docs-text-light);
    pointer-events: none;
}

/* ========== Main Layout ========== */
.docs-main {
    min-height: calc(100vh - var(--header-height));
}

.docs-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - var(--header-height));
}

/* ========== Sidebar ========== */
.docs-sidebar {
    width: var(--sidebar-width);
    background: var(--docs-sidebar-bg);
    border-right: 1px solid var(--docs-border);
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section:last-child {
    margin-bottom: 1rem;
}

.nav-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--docs-text);
    margin: 0 0 0.75rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

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

.nav-section li {
    margin: 0;
}

.nav-section a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--docs-text-light);
    text-decoration: none;
    font-size: 0.875rem;
    border-right: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-section a:hover {
    color: var(--docs-text);
    background: var(--docs-bg);
    border-right-color: var(--docs-accent-light);
}

.nav-section a.active,
.nav-section a[aria-current="page"] {
    color: var(--docs-accent);
    background: rgba(124, 58, 237, 0.05);
    border-right-color: var(--docs-accent);
    font-weight: 500;
}

/* ========== Content Area ========== */
.docs-content {
    flex: 1;
    max-width: calc(100% - var(--sidebar-width));
    padding: 2rem;
    background: var(--docs-content-bg);
}

/* ========== Documentation Hero ========== */
.docs-hero {
    text-align: center;
    padding: 3rem 0 4rem 0;
    border-bottom: 1px solid var(--docs-border);
    margin-bottom: 3rem;
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 600;
    color: var(--docs-text);
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--docs-text-light);
    margin: 0 0 2rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--docs-accent);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--docs-text-light);
    margin-top: 0.25rem;
}

/* ========== Quick Start Cards ========== */
.quick-start {
    margin-bottom: 4rem;
}

.quick-start h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--docs-text);
    margin: 0 0 1.5rem 0;
    text-align: center;
}

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

.start-card {
    background: var(--docs-content-bg);
    border: 1px solid var(--docs-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.start-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--docs-accent-light);
}

.start-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.start-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
}

.start-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--docs-text);
    margin: 0 0 0.5rem 0;
}

.start-card p {
    color: var(--docs-text-light);
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.card-arrow {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--docs-accent);
    font-weight: 600;
    font-size: 1.25rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.start-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ========== Popular Topics ========== */
.popular-topics {
    margin-bottom: 4rem;
}

.popular-topics h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--docs-text);
    margin: 0 0 2rem 0;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.topic-category h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--docs-text);
    margin: 0 0 1rem 0;
}

.topic-category h3 svg {
    color: var(--docs-accent);
    flex-shrink: 0;
}

.topic-category ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.topic-category li {
    margin: 0 0 0.75rem 0;
}

.topic-category li:last-child {
    margin-bottom: 0;
}

.topic-category a {
    color: var(--docs-text-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.topic-category a:hover {
    color: var(--docs-accent);
}

.topic-category a::before {
    content: '→';
    margin-right: 0.5rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.topic-category a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ========== Help Section ========== */
.help-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1rem;
    padding: 3rem;
    color: white;
    margin: 3rem 0;
}

.help-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.help-text h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.help-text p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.help-options {
    display: flex;
    gap: 1rem;
}

.help-options .btn-primary {
    background: white;
    color: var(--primary);
}

.help-options .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

.help-options .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.help-options .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.help-stats {
    display: flex;
    gap: 2rem;
}

.help-stat {
    text-align: center;
}

.help-stat .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.help-stat .stat-label {
    display: block;
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* ========== Documentation Footer ========== */
.docs-footer {
    background: var(--docs-sidebar-bg);
    border-top: 1px solid var(--docs-border);
    padding: 3rem 0 1.5rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--docs-text);
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section li {
    margin: 0 0 0.5rem 0;
}

.footer-section a {
    color: var(--docs-text-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--docs-accent);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--docs-border);
    font-size: 0.875rem;
    color: var(--docs-text-light);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-links a {
    color: var(--docs-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--docs-accent);
}

/* ========== Content Typography ========== */
.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content h4,
.docs-content h5,
.docs-content h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--docs-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.docs-content h1:first-child,
.docs-content h2:first-child,
.docs-content h3:first-child {
    margin-top: 0;
}

.docs-content h1 {
    font-size: 2.5rem;
    font-family: var(--font-display);
}

.docs-content h2 {
    font-size: 2rem;
}

.docs-content h3 {
    font-size: 1.5rem;
}

.docs-content h4 {
    font-size: 1.25rem;
}

.docs-content p {
    margin: 0 0 1rem 0;
    color: var(--docs-text-light);
}

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

.docs-content a:hover {
    text-decoration: underline;
}

.docs-content ul,
.docs-content ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.docs-content li {
    margin: 0 0 0.5rem 0;
    color: var(--docs-text-light);
}

/* ========== Code Blocks ========== */
.docs-content code {
    background: var(--docs-code-bg);
    color: var(--docs-text);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.875em;
    border: 1px solid var(--docs-code-border);
}

.docs-content pre {
    background: var(--docs-code-bg);
    border: 1px solid var(--docs-code-border);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.docs-content pre code {
    background: none;
    border: none;
    padding: 0;
}

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

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

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

.docs-content td {
    color: var(--docs-text-light);
}

/* ========== Alerts & Callouts ========== */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-info {
    background: rgba(59, 130, 246, 0.05);
    border-left-color: #3b82f6;
    color: #1e40af;
}

.alert-success {
    background: rgba(16, 185, 129, 0.05);
    border-left-color: var(--docs-success);
    color: #047857;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.05);
    border-left-color: var(--docs-warning);
    color: #92400e;
}

.alert-error {
    background: rgba(239, 68, 68, 0.05);
    border-left-color: var(--docs-error);
    color: #991b1b;
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }

    .nav-search input {
        width: 200px;
    }

    .hero-stats {
        gap: 2rem;
    }

    .help-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .help-stats {
        justify-content: center;
    }
}

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

    .docs-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--docs-border);
    }

    .docs-content {
        max-width: 100%;
        padding: 1.5rem;
    }

    .nav-content {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 1rem;
        border-top: 1px solid var(--docs-border);
        gap: 1rem;
    }

    .nav-search {
        order: 2;
    }

    .nav-search input {
        width: 180px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .quick-start-grid {
        grid-template-columns: 1fr;
    }

    .topics-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .help-section {
        padding: 2rem;
    }

    .help-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .docs-content {
        padding: 1rem;
    }

    .docs-hero {
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .help-section {
        padding: 1.5rem;
    }

    .help-text h2 {
        font-size: 1.5rem;
    }

    .help-options {
        flex-direction: column;
        width: 100%;
    }
}

/* ========== Print Styles ========== */
@media print {
    .docs-header,
    .docs-sidebar,
    .docs-footer,
    .help-section {
        display: none !important;
    }

    .docs-content {
        max-width: 100%;
        padding: 0;
        box-shadow: none;
    }

    .docs-layout {
        display: block;
    }

    * {
        color: black !important;
        background: white !important;
    }
}

/* ========== Accessibility ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles */
.docs-nav a:focus,
.nav-section a:focus,
.start-card:focus,
.topic-category a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--docs-accent);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --docs-border: #000000;
        --docs-text-light: #000000;
    }

    .start-card,
    .docs-sidebar,
    .docs-content {
        border-width: 2px;
    }
}
