/**
 * Documentation Page CSS
 * Professional left-sidebar documentation layout
 */

/* ========================================
   CSS Variables
   ======================================== */

:root {
    --primary: #14c975;
    --primary-dark: #10a85f;
    --text: #1e293b;
    --muted: #64748b;
    --bg: #f8fafc;
    --bg-alt: #f1f5f9;
    --border: #e2e8f0;
}

/* ========================================
   Documentation Body & Main Layout
   ======================================== */

.docs-body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
    color: var(--text);
    line-height: 1.6;
}

.docs-main {
    padding-top: 64px;
}

/* ========================================
   Documentation Header
   ======================================== */

.docs-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.docs-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.docs-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

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

.docs-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.docs-logo-badge {
    padding: 0.25rem 0.6rem;
    background: var(--bg);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.docs-back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.docs-back-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    text-decoration: none;
}

.docs-back-btn i {
    font-size: 0.8rem;
}

/* ========================================
   Breadcrumb Navigation
   ======================================== */

.docs-breadcrumb {
    background: var(--bg, #f8fafc);
    border-bottom: 1px solid var(--border, #e2e8f0);
    padding: 0.875rem 0;
}

.docs-breadcrumb .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list a {
    color: var(--muted, #64748b);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.15s ease;
}

.breadcrumb-list a:hover {
    color: var(--primary, #14c975);
    text-decoration: none;
}

.breadcrumb-list a i {
    font-size: 0.8rem;
}

.breadcrumb-list .separator {
    color: var(--muted, #64748b);
    padding: 0 0.5rem;
    font-size: 0.65rem;
}

.breadcrumb-list .current {
    color: var(--text, #1e293b);
    font-weight: 500;
}

/* ========================================
   Layout Structure
   ======================================== */

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

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

.docs-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 1.5rem 0;
}

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

.docs-nav-section {
    margin-bottom: 1.5rem;
}

.docs-nav-section h4 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted, #64748b);
    margin: 0 0 0.75rem 0;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.docs-nav-section h4 i {
    font-size: 0.75rem;
    color: var(--primary, #14c975);
    opacity: 0.8;
}

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

.docs-nav-section li {
    margin: 0;
}

.docs-nav-section a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: var(--text, #1e293b);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
}

.docs-nav-section a i {
    font-size: 0.85rem;
    color: var(--muted, #64748b);
    width: 18px;
    text-align: center;
    transition: color 0.15s ease;
}

.docs-nav-section a:hover {
    background: var(--bg);
    color: var(--primary);
    text-decoration: none;
}

.docs-nav-section a.active {
    background: rgba(20, 201, 117, 0.08);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

/* Scrollbar styling for sidebar */
.docs-sidebar::-webkit-scrollbar {
    width: 4px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

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

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

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

.docs-content {
    flex: 1;
    min-width: 0;
    padding: 2rem 3rem;
    max-width: 900px;
}

.doc-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

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

.doc-section h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--text);
}

.doc-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-top: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.doc-section h2 i {
    color: var(--primary);
    font-size: 1.25rem;
}

.doc-section h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem 0;
    color: var(--text);
}

.doc-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
    color: var(--text);
}

.doc-section p {
    margin: 0 0 1rem 0;
    line-height: 1.7;
}

.doc-section p.lead {
    font-size: 1.1rem;
    color: var(--muted);
    line-height: 1.8;
}

/* ========================================
   Feature Grid
   ======================================== */

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

.feature-grid .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.feature-grid .feature-item i {
    font-size: 1.25rem;
    color: var(--primary);
    margin-top: 0.15rem;
}

.feature-grid .feature-item div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.feature-grid .feature-item strong {
    font-size: 0.95rem;
    color: var(--text);
}

.feature-grid .feature-item span {
    font-size: 0.85rem;
    color: var(--muted);
}

/* ========================================
   Steps
   ======================================== */

.steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 1.5rem 0;
}

.step {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    position: relative;
}

.step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 44px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.step-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.step-content p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* ========================================
   Callouts (Info, Warning, Success)
   ======================================== */

.callout {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.callout i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.callout div {
    flex: 1;
}

.callout strong {
    display: block;
    margin-bottom: 0.25rem;
}

.callout p {
    margin: 0;
    font-size: 0.95rem;
}

.callout ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.callout ul li {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.callout-info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.callout-info i {
    color: #3b82f6;
}

.callout-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.callout-warning i {
    color: #f59e0b;
}

.callout-success {
    background: rgba(20, 201, 117, 0.08);
    border: 1px solid rgba(20, 201, 117, 0.2);
}

.callout-success i {
    color: var(--primary);
}

/* ========================================
   Platform Cards
   ======================================== */

.platform-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.platform-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.platform-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(20, 201, 117, 0.1);
}

.platform-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.platform-icon i {
    font-size: 1.5rem;
    color: #fff;
}

.platform-icon.wordpress {
    background: linear-gradient(135deg, #21759b, #1e6a8d);
}

.platform-icon.opencart {
    background: linear-gradient(135deg, #23a8e0, #1e95c9);
}

.platform-icon.shopify {
    background: linear-gradient(135deg, #96bf48, #7ea83f);
}

.platform-icon.custom {
    background: linear-gradient(135deg, #6366f1, #5558e3);
}

.platform-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

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

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
}

/* ========================================
   Lists
   ======================================== */

.numbered-list {
    counter-reset: item;
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.numbered-list li {
    counter-increment: item;
    padding: 0.5rem 0 0.5rem 2rem;
    position: relative;
}

.numbered-list li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 22px;
    height: 22px;
    background: var(--bg);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.check-list li {
    padding: 0.4rem 0 0.4rem 1.75rem;
    position: relative;
}

.check-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 0.85rem;
}

.settings-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.settings-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.settings-list strong {
    color: var(--text);
}

.tag-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border-radius: 8px;
    font-size: 0.9rem;
}

.tag-list li i {
    color: var(--primary);
}

/* ========================================
   Code Blocks
   ======================================== */

.code-block {
    background: #1e293b;
    border-radius: 10px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: #94a3b8;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.code-block pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #e2e8f0;
}

/* Inline code */
code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.85em;
    padding: 0.15rem 0.4rem;
    background: rgba(20, 201, 117, 0.1);
    border-radius: 4px;
    color: var(--primary-dark);
}

/* ========================================
   Tables
   ======================================== */

.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

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

.docs-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.docs-table td code {
    font-size: 0.85rem;
}

.method-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.method-badge.get {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.method-badge.post {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.method-badge.put {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.method-badge.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.pending {
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
}

.status-badge.processing {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.status-badge.success {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* ========================================
   Method Cards
   ======================================== */

.method-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.method-card h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
}

.method-card h4 i {
    color: var(--primary);
}

.method-card p {
    margin: 0 0 0.75rem 0;
    color: var(--muted);
}

.method-card .numbered-list {
    margin: 0;
}

/* ========================================
   FAQ
   ======================================== */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.faq-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.faq-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

/* ========================================
   Support Cards
   ======================================== */

.support-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.support-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.support-card i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.support-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

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

.support-card .response-time {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

/* ========================================
   CTA Box
   ======================================== */

.cta-box {
    background: linear-gradient(135deg, rgba(20, 201, 117, 0.1) 0%, rgba(20, 201, 117, 0.05) 100%);
    border: 1px solid rgba(20, 201, 117, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.cta-box h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.cta-box p {
    margin: 0 0 1.5rem 0;
    color: var(--muted);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 201, 117, 0.3);
    text-decoration: none;
    color: #fff;
}

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

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

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

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

    .docs-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0 1rem;
    }

    .docs-nav-section {
        margin-bottom: 0;
    }

    .docs-nav-section h4 {
        display: none;
    }

    .docs-nav-section ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .docs-nav-section a {
        padding: 0.5rem 0.875rem;
        background: var(--bg);
        border-radius: 20px;
        font-size: 0.85rem;
        border-left: none;
    }

    .docs-nav-section a.active {
        background: var(--primary);
        color: #fff;
        border-left: none;
    }

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

    .doc-section h1 {
        font-size: 1.75rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .doc-section h1 {
        font-size: 1.5rem;
    }

    .doc-section h2 {
        font-size: 1.25rem;
    }

    .steps .step::before {
        display: none;
    }

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

    .docs-table {
        font-size: 0.8rem;
    }

    .docs-table th,
    .docs-table td {
        padding: 0.5rem 0.75rem;
    }

    .code-block pre {
        padding: 1rem;
    }

    .code-block code {
        font-size: 0.8rem;
    }
}
