/* ApplauseLab Documentation Styles */

/* Layout */
.docs-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    margin-top: 80px;
}

/* Sidebar */
.docs-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--al-dark);
    border-right: 1px solid rgba(0, 255, 78, 0.1);
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    padding: var(--al-space-xl) 0;
}

.docs-sidebar-nav {
    padding: 0 var(--al-space-lg);
}

.docs-sidebar-section {
    margin-bottom: var(--al-space-xl);
}

.docs-sidebar-section-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--al-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--al-space-sm) 0;
    margin-bottom: var(--al-space-sm);
}

.docs-sidebar-section-title:hover {
    color: var(--al-primary-light);
}

.docs-sidebar-group {
    margin-bottom: var(--al-space-md);
}

.docs-sidebar-group-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--al-white);
    text-decoration: none;
    padding: var(--al-space-xs) 0;
    margin-bottom: var(--al-space-xs);
}

.docs-sidebar-group-title:hover,
.docs-sidebar-group-title.active {
    color: var(--al-primary);
}

.docs-sidebar-list {
    list-style: none;
    padding-left: var(--al-space-md);
    margin: 0;
}

.docs-sidebar-list li {
    margin-bottom: var(--al-space-xs);
}

.docs-sidebar-list a {
    display: block;
    font-size: 0.875rem;
    color: var(--al-gray-300);
    text-decoration: none;
    padding: var(--al-space-xs) var(--al-space-sm);
    border-radius: var(--al-radius-sm);
    transition: all var(--al-transition-fast);
}

.docs-sidebar-list a:hover {
    color: var(--al-white);
    background: rgba(0, 255, 78, 0.05);
}

.docs-sidebar-list a.active {
    color: var(--al-primary);
    background: rgba(0, 255, 78, 0.1);
    border-left: 2px solid var(--al-primary);
    padding-left: calc(var(--al-space-sm) - 2px);
}

/* Main Content */
.docs-main {
    flex: 1;
    min-width: 0;
    background: var(--al-black);
}

.docs-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--al-space-2xl) var(--al-space-3xl);
}

/* Article */
.docs-article {
    color: var(--al-gray-100);
}

.docs-header {
    margin-bottom: var(--al-space-2xl);
    padding-bottom: var(--al-space-xl);
    border-bottom: 1px solid rgba(0, 255, 78, 0.1);
}

.docs-header h1 {
    font-size: 2.5rem;
    color: var(--al-white);
    margin-bottom: var(--al-space-md);
}

.docs-description {
    font-size: 1.125rem;
    color: var(--al-gray-300);
    margin-bottom: 0;
}

.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--al-space-sm);
    font-size: 0.875rem;
    margin-bottom: var(--al-space-md);
}

.docs-breadcrumb a {
    color: var(--al-gray-400);
    text-decoration: none;
}

.docs-breadcrumb a:hover {
    color: var(--al-primary);
}

.docs-breadcrumb span {
    color: var(--al-gray-600);
}

/* Table of Contents */
.docs-toc {
    background: rgba(0, 255, 78, 0.03);
    border: 1px solid rgba(0, 255, 78, 0.1);
    border-radius: var(--al-radius-md);
    padding: var(--al-space-lg);
    margin-bottom: var(--al-space-xl);
}

.docs-toc h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--al-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--al-space-md);
}

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

.docs-toc li {
    margin-bottom: var(--al-space-xs);
}

.docs-toc a {
    color: var(--al-gray-300);
    text-decoration: none;
    font-size: 0.875rem;
    display: block;
}

.docs-toc a:hover {
    color: var(--al-primary);
}

.docs-toc ul ul {
    padding-left: var(--al-space-md);
    margin-top: var(--al-space-xs);
    list-style: none;
}

/* Body Content */
.docs-body {
    line-height: 1.8;
    font-size: 1.0625rem;
}

.docs-body h2 {
    font-size: 1.75rem;
    color: var(--al-white);
    margin-top: var(--al-space-2xl);
    margin-bottom: var(--al-space-lg);
    padding-bottom: var(--al-space-sm);
    border-bottom: 1px solid rgba(0, 255, 78, 0.1);
}

.docs-body h3 {
    font-size: 1.375rem;
    color: var(--al-white);
    margin-top: var(--al-space-xl);
    margin-bottom: var(--al-space-md);
}

.docs-body h4 {
    font-size: 1.125rem;
    color: var(--al-gray-200);
    margin-top: var(--al-space-lg);
    margin-bottom: var(--al-space-md);
}

.docs-body p {
    color: var(--al-gray-200);
    margin-bottom: var(--al-space-md);
}

.docs-body a {
    color: var(--al-primary);
    text-decoration: none;
}

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

.docs-body strong {
    color: var(--al-white);
    font-weight: 600;
}

.docs-body ul,
.docs-body ol {
    margin-bottom: var(--al-space-md);
    padding-left: var(--al-space-xl);
}

.docs-body li {
    margin-bottom: var(--al-space-sm);
    color: var(--al-gray-200);
}

.docs-body li::marker {
    color: var(--al-primary);
}

/* Code Blocks */
.docs-body code {
    font-family: var(--al-font-mono);
    font-size: 0.875em;
    background: rgba(0, 255, 78, 0.08);
    color: var(--al-primary-light);
    padding: 0.2em 0.4em;
    border-radius: var(--al-radius-sm);
}

.docs-body pre {
    background: var(--al-gray-900);
    border: 1px solid rgba(0, 255, 78, 0.1);
    border-radius: var(--al-radius-md);
    padding: var(--al-space-lg);
    overflow-x: auto;
    margin-bottom: var(--al-space-lg);
}

.docs-body pre code {
    background: none;
    padding: 0;
    color: var(--al-gray-100);
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Tables */
.docs-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--al-space-lg);
}

.docs-body th,
.docs-body td {
    text-align: left;
    padding: var(--al-space-md);
    border-bottom: 1px solid rgba(0, 255, 78, 0.1);
}

.docs-body th {
    font-weight: 600;
    color: var(--al-primary);
    background: rgba(0, 255, 78, 0.05);
}

.docs-body td {
    color: var(--al-gray-200);
}

.docs-body tr:hover td {
    background: rgba(0, 255, 78, 0.02);
}

/* Blockquotes / Callouts */
.docs-body blockquote {
    border-left: 3px solid var(--al-primary);
    background: rgba(0, 255, 78, 0.05);
    padding: var(--al-space-md) var(--al-space-lg);
    margin: var(--al-space-lg) 0;
    border-radius: 0 var(--al-radius-md) var(--al-radius-md) 0;
}

.docs-body blockquote p:last-child {
    margin-bottom: 0;
}



/* Navigation Footer */
.docs-footer {
    margin-top: var(--al-space-3xl);
    padding-top: var(--al-space-xl);
    border-top: 1px solid rgba(0, 255, 78, 0.1);
}

.docs-nav-links {
    display: flex;
    justify-content: space-between;
    gap: var(--al-space-lg);
}

.docs-nav-prev,
.docs-nav-next {
    display: flex;
    flex-direction: column;
    padding: var(--al-space-md) var(--al-space-lg);
    background: var(--al-gray-900);
    border: 1px solid rgba(0, 255, 78, 0.1);
    border-radius: var(--al-radius-md);
    text-decoration: none;
    transition: all var(--al-transition-fast);
    max-width: 45%;
}

.docs-nav-prev:hover,
.docs-nav-next:hover {
    border-color: var(--al-primary);
}

.docs-nav-next {
    margin-left: auto;
    text-align: right;
}

.docs-nav-label {
    font-size: 0.75rem;
    color: var(--al-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--al-space-xs);
}

.docs-nav-title {
    color: var(--al-primary);
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .docs-sidebar {
        width: 240px;
        min-width: 240px;
    }
}

@media (max-width: 768px) {
    .docs-layout {
        flex-direction: column;
    }
    
    .docs-sidebar {
        width: 100%;
        min-width: 100%;
        position: relative;
        top: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(0, 255, 78, 0.1);
        padding: var(--al-space-lg);
    }
    
    .docs-sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: var(--al-space-md);
    }
    
    .docs-sidebar-section {
        margin-bottom: 0;
    }
    
    .docs-sidebar-list {
        display: none;
    }
    
    .docs-content {
        padding: var(--al-space-lg);
    }
    
    .docs-header h1 {
        font-size: 1.75rem;
    }
    
    .docs-nav-links {
        flex-direction: column;
    }
    
    .docs-nav-prev,
    .docs-nav-next {
        max-width: 100%;
    }
    
    .docs-nav-next {
        text-align: left;
    }
}

/* Syntax Highlighting Overrides for Docs */
.docs-body .highlight {
    margin-bottom: var(--al-space-lg);
}

.docs-body .highlight pre {
    margin-bottom: 0;
}

/* Callout Boxes */
.docs-callout {
    padding: var(--al-space-lg);
    border-radius: var(--al-radius-md);
    margin: var(--al-space-lg) 0;
}

.docs-callout-info {
    background: rgba(0, 191, 255, 0.1);
    border-left: 3px solid #00bfff;
}

.docs-callout-warning {
    background: rgba(255, 215, 0, 0.1);
    border-left: 3px solid #ffd700;
}

.docs-callout-danger {
    background: rgba(255, 68, 68, 0.1);
    border-left: 3px solid #ff4444;
}

.docs-callout-success {
    background: rgba(0, 255, 78, 0.1);
    border-left: 3px solid var(--al-primary);
}

.docs-callout-title {
    font-weight: 700;
    margin-bottom: var(--al-space-sm);
}

.docs-callout-info .docs-callout-title { color: #00bfff; }
.docs-callout-warning .docs-callout-title { color: #ffd700; }
.docs-callout-danger .docs-callout-title { color: #ff4444; }
.docs-callout-success .docs-callout-title { color: var(--al-primary); }

/* Keyboard Shortcuts */
kbd {
    display: inline-block;
    padding: 0.2em 0.5em;
    font-family: var(--al-font-mono);
    font-size: 0.85em;
    color: var(--al-gray-100);
    background: var(--al-gray-800);
    border: 1px solid var(--al-gray-600);
    border-radius: var(--al-radius-sm);
    box-shadow: inset 0 -1px 0 var(--al-gray-700);
}

/* ===========================
   Docs Home Page
   =========================== */

.docs-home {
    min-height: calc(100vh - 80px);
    margin-top: 80px;
    padding: var(--al-space-4xl) var(--al-space-xl);
    background: var(--al-black);
}

.docs-home-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--al-space-3xl);
}

.docs-home-header h1 {
    font-size: 3rem;
    color: var(--al-white);
    margin-bottom: var(--al-space-md);
}

.docs-home-description {
    font-size: 1.25rem;
    color: var(--al-gray-400);
    margin: 0;
}

.docs-home-content {
    max-width: 900px;
    margin: 0 auto;
}

.docs-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--al-space-lg);
}

.docs-product-card {
    display: flex;
    align-items: flex-start;
    gap: var(--al-space-lg);
    padding: var(--al-space-xl);
    background: var(--al-gray-900);
    border: 1px solid rgba(0, 255, 78, 0.15);
    border-radius: var(--al-radius-lg);
    text-decoration: none;
    transition: all var(--al-transition-base);
    position: relative;
}

.docs-product-card:hover {
    border-color: var(--al-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 255, 78, 0.1);
}

.docs-product-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 78, 0.1);
    border-radius: var(--al-radius-md);
    color: var(--al-primary);
}

.docs-product-icon svg {
    width: 24px;
    height: 24px;
}

.docs-product-info {
    flex: 1;
}

.docs-product-info h2 {
    font-size: 1.375rem;
    color: var(--al-white);
    margin-bottom: var(--al-space-sm);
}

.docs-product-info p {
    font-size: 0.9rem;
    color: var(--al-gray-400);
    margin: 0;
    line-height: 1.6;
}

.docs-product-arrow {
    position: absolute;
    top: var(--al-space-lg);
    right: var(--al-space-lg);
    font-size: 1.25rem;
    color: var(--al-primary);
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--al-transition-fast);
}

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

/* ===========================
   Product Docs Landing Page
   =========================== */

.docs-product-landing {
    padding-bottom: var(--al-space-2xl);
}

.docs-product-hero {
    text-align: center;
    padding: var(--al-space-xl) 0 var(--al-space-2xl);
    border-bottom: 1px solid rgba(0, 255, 78, 0.1);
    margin-bottom: var(--al-space-2xl);
}

.docs-product-icon {
    width: 80px;
    height: 80px;
    display: block;
    margin: 0 auto var(--al-space-lg) auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.docs-product-hero h1 {
    font-size: 2.5rem;
    color: var(--al-white);
    margin-bottom: var(--al-space-md);
}

.docs-product-hero .docs-description {
    font-size: 1.125rem;
    color: var(--al-gray-300);
    max-width: 600px;
    margin: 0 auto;
}

.docs-product-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--al-space-lg);
}

.docs-product-section-card {
    display: block;
    padding: var(--al-space-lg);
    background: var(--al-gray-900);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--al-radius-md);
    text-decoration: none !important;
    transition: all var(--al-transition-base);
}

.docs-product-section-card:hover {
    border-color: rgba(0, 255, 78, 0.5);
    background: rgba(0, 255, 78, 0.02);
    text-decoration: none !important;
}

.docs-product-section-card h3,
.docs-product-section-card p {
    text-decoration: none !important;
}

.docs-product-section-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--al-white);
    margin-bottom: var(--al-space-sm);
    margin-top: 0;
}

.docs-product-section-card p {
    font-size: 0.875rem;
    color: var(--al-gray-400);
    margin: 0;
    line-height: 1.5;
}

/* Override docs-body link styles for cards */
.docs-body .docs-product-section-card,
.docs-body .docs-product-section-card:hover,
.docs-body .docs-product-section-card h3,
.docs-body .docs-product-section-card p {
    text-decoration: none !important;
    color: inherit;
}

.docs-body .docs-product-section-card h3 {
    color: var(--al-white);
}

.docs-body .docs-product-section-card p {
    color: var(--al-gray-400);
}

.docs-product-section-card {
    display: block;
    padding: var(--al-space-xl);
    background: var(--al-gray-900);
    border: 1px solid rgba(0, 255, 78, 0.1);
    border-radius: var(--al-radius-md);
    text-decoration: none;
    transition: all var(--al-transition-base);
}

.docs-product-section-card:hover {
    border-color: var(--al-primary);
    background: rgba(0, 255, 78, 0.02);
}

.docs-product-section-card h3 {
    font-size: 1.125rem;
    color: var(--al-white);
    margin-bottom: var(--al-space-sm);
}

.docs-product-section-card p {
    font-size: 0.875rem;
    color: var(--al-gray-400);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .docs-products-grid {
        grid-template-columns: 1fr;
    }
    
    .docs-product-sections {
        grid-template-columns: 1fr;
    }
    
    .docs-home-header h1 {
        font-size: 2rem;
    }
}
