/* =====================================================
   ZEM CLOUD - Documentation Styles
   Clean, readable documentation layout
   ===================================================== */

.docs-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
    background: var(--bg-primary);
}

/* =====================================================
   Sidebar
   ===================================================== */

.docs-sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.docs-sidebar-inner {
    padding: var(--space-lg);
}

.docs-search {
    position: relative;
    margin-bottom: var(--space-xl);
}

.docs-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.4);
}

.docs-search input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.docs-search input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.docs-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

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

.docs-nav-section h4 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--space-sm);
    padding: 0 var(--space-sm);
}

.docs-nav-section ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.docs-nav-section a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    transition: all 0.15s ease;
}

.docs-nav-section a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.docs-nav-section a.active {
    color: #0071e3;
    background: rgba(0, 113, 227, 0.15);
    font-weight: 500;
}

/* =====================================================
   Main Content
   ===================================================== */

.docs-content {
    flex: 1;
    max-width: 760px;
    padding: var(--space-2xl) var(--space-3xl);
}

.docs-article {
    max-width: 100%;
}

.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: var(--space-lg);
}

.docs-breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.15s ease;
}

.docs-breadcrumb a:hover {
    color: #0071e3;
}

.docs-breadcrumb span {
    color: rgba(255, 255, 255, 0.3);
}

.docs-header h1 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
    color: #ffffff;
}

.docs-lead {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: var(--space-3xl);
}

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

.docs-section h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: var(--space-md);
    padding-top: var(--space-lg);
    color: #ffffff;
    letter-spacing: -0.01em;
}

.docs-section:first-of-type h2 {
    padding-top: 0;
}

.docs-section p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.docs-section ul,
.docs-section ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.docs-section li {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 8px;
}

.docs-section ul li {
    list-style-type: disc;
}

.docs-section ul li::marker {
    color: rgba(255, 255, 255, 0.3);
}

.docs-feature-list {
    list-style: none;
    padding-left: 0;
}

.docs-feature-list li {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-feature-list li:last-child {
    border-bottom: none;
}

.docs-feature-list strong {
    color: #ffffff;
    min-width: 160px;
    flex-shrink: 0;
}

/* Steps */
.docs-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.docs-step {
    display: flex;
    gap: var(--space-md);
}

.docs-step .step-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0071e3;
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
}

.docs-step .step-content {
    flex: 1;
    padding-top: 2px;
}

.docs-step .step-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #ffffff;
}

.docs-step .step-content p {
    margin-bottom: var(--space-sm);
}

/* Code blocks */
.docs-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: var(--space-sm);
}

.docs-code code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 14px;
    color: #ffffff;
}

.copy-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.15s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #0071e3;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

/* Cards */
.docs-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.docs-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: var(--space-lg);
    transition: all 0.2s ease;
    text-decoration: none;
}

.docs-card:hover {
    border-color: rgba(0, 113, 227, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.docs-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #ffffff;
}

.docs-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.5;
}

/* Footer */
.docs-footer {
    margin-top: var(--space-4xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-footer-nav {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-2xl);
}

.docs-nav-prev a,
.docs-nav-next a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.docs-nav-prev a:hover,
.docs-nav-next a:hover {
    border-color: rgba(0, 113, 227, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.docs-nav-next a {
    text-align: right;
    align-items: flex-end;
}

.docs-footer-nav span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.docs-footer-nav strong {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
}

.docs-footer-nav svg {
    width: 16px;
    height: 16px;
    color: #0071e3;
    margin-top: 4px;
}

.docs-feedback {
    text-align: center;
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.docs-feedback p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-md);
}

.docs-feedback-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
}

.feedback-btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.15s ease;
}

.feedback-btn:hover {
    border-color: rgba(0, 113, 227, 0.5);
    color: #0071e3;
    background: rgba(0, 113, 227, 0.1);
}

/* =====================================================
   Table of Contents
   ===================================================== */

.docs-toc {
    width: 200px;
    flex-shrink: 0;
    padding: var(--space-2xl) var(--space-lg);
    position: sticky;
    top: var(--header-height);
    height: fit-content;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.docs-toc h4 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--space-md);
}

.docs-toc ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: var(--space-md);
}

.docs-toc a {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    padding: 4px 0;
    transition: color 0.15s ease;
}

.docs-toc a:hover {
    color: #ffffff;
}

.docs-toc a.active {
    color: #0071e3;
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 1200px) {
    .docs-toc {
        display: none;
    }

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

@media (max-width: 1024px) {
    .docs-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .docs-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .docs-content {
        padding: var(--space-xl);
    }

    .docs-header h1 {
        font-size: 26px;
    }

    .docs-lead {
        font-size: 16px;
    }

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

    .docs-feature-list li {
        flex-direction: column;
        gap: 4px;
    }

    .docs-feature-list strong {
        min-width: auto;
    }
}
