/* ============================================
   SCHEMA GALLERY DOCUMENTATION - LIGHTBOX
   ============================================ */

/* Lightbox Overlay */
.sg-docs-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sg-docs-lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

/* Lightbox Content Container */
.sg-docs-lightbox-content {
    position: relative;
    max-width: 70%;
    max-height: 70%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Lightbox Image */
#sgDocsLightboxImg {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Close Button */
.sg-docs-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 45px;
    font-weight: 300;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-docs-lightbox-close:hover {
    color: #7c3aed;
    transform: scale(1.1);
}

/* Caption */
.sg-docs-lightbox-caption {
    position: absolute;
    bottom: -45px;
    left: 0;
    right: 0;
    color: white;
    text-align: center;
    font-size: 16px;
    padding: 0 20px;
    line-height: 1.4;
}

/* Make documentation images clickable */
.docs-wrapper .info-box img {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.docs-wrapper .info-box img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.2);
}


/* ============================================
   DOCUMENTATION PAGE STYLING
   ============================================ */

.docs-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: #ffffff;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Table of Contents */
.table-of-contents {
    background: #f8f7ff;
    border-left: 4px solid #7c3aed;
    padding: 32px;
    border-radius: 8px;
    margin-bottom: 60px;
}

.table-of-contents h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #7c3aed;
    margin-bottom: 24px;
    font-weight: 700;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.toc-list li {
    margin: 0;
}

.toc-list a {
    color: #4a5568;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 12px;
    display: block;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.toc-list a:hover {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
    padding-left: 16px;
}

/* Main Content */
.docs-wrapper section {
    margin-bottom: 80px;
    scroll-margin-top: 20px;
}

.docs-wrapper section h2 {
    font-size: 36px;
    color: #1a202c;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    padding-bottom: 16px;
    border-bottom: 3px solid #7c3aed;
}

.docs-wrapper section h3 {
    font-size: 28px;
    color: #2d3748;
    margin: 48px 0 20px 0;
    font-weight: 600;
}

.docs-wrapper section h4 {
    font-size: 22px;
    color: #4a5568;
    margin: 32px 0 16px 0;
    font-weight: 600;
}

.docs-wrapper p {
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 17px;
    line-height: 1.8;
}

/* Lists */
.docs-wrapper ul, 
.docs-wrapper ol {
    margin: 20px 0 20px 32px;
    color: #4a5568;
}

.docs-wrapper li {
    margin-bottom: 12px;
    line-height: 1.7;
    font-size: 17px;
}

.docs-wrapper strong {
    color: #2d3748;
    font-weight: 600;
}

/* Code Blocks */
.docs-wrapper code {
    background: #f7fafc;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 15px;
    color: #7c3aed;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.docs-wrapper pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.6;
}

.docs-wrapper pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
    border: none;
}

/* Info Boxes */
.info-box {
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    padding: 24px 28px;
    margin: 28px 0;
    border-radius: 6px;
}

.info-box.purple {
    background: #f8f7ff;
    border-left-color: #7c3aed;
}

.info-box.success {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.info-box.warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.info-box.danger {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.info-box strong {
    display: block;
    margin-bottom: 12px;
    color: #1a202c;
    font-size: 18px;
}

.info-box p {
    margin: 0;
    font-size: 17px;
}

/* Tables */
.docs-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.docs-wrapper th {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: white;
    padding: 18px 24px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.docs-wrapper td {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 16px;
}

.docs-wrapper tr:last-child td {
    border-bottom: none;
}

.docs-wrapper tr:hover {
    background: #f8f9fa;
}

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

/* 4 Column Feature Grid for Pro Features */
.feature-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 36px 0 60px 0;
}

/* Account Management Section */
.account-management-section {
    max-width: 700px;
    margin: 60px auto 0;
    text-align: center;
}

.account-management-section h3 {
    margin-top: 0;
}

.account-management-section p {
    text-align: center;
}

.account-management-section .icon-list {
    text-align: left;
    display: inline-block;
    margin: 20px auto 0;
}

.feature-card {
    background: #f8f9fa;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #7c3aed;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.15);
    transform: translateY(-2px);
}

.feature-card h4 {
    color: #7c3aed;
    margin: 0 0 12px 0;
    font-size: 20px;
}

.feature-card p {
    margin: 0;
    font-size: 16px;
    color: #64748b;
}

.feature-card ul {
    margin: 12px 0 0 0;
    padding-left: 20px;
}

/* Step-by-Step Guide */
.steps {
    counter-reset: step;
    margin: 36px 0;
}

.step {
    position: relative;
    padding-left: 70px;
    margin-bottom: 48px;
    counter-increment: step;
}

.step::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.step h3, 
.step h4 {
    margin-top: 0;
}

/* Icon bullets */

.icon-list {
    list-style: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.icon-list li {
    padding-left: 36px;
    position: relative;
    list-style: none !important;
}

.icon-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #7c3aed;
    font-weight: bold;
    font-size: 20px;
}

/* Back to top */
.back-to-top {
    text-align: center;
    margin: 60px 0 20px;
}

.back-to-top a {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.back-to-top a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .docs-wrapper {
        padding: 30px 15px;
    }

    .docs-wrapper section h2 {
        font-size: 28px;
    }

    .docs-wrapper section h3 {
        font-size: 24px;
    }

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

    .toc-list {
        grid-template-columns: 1fr;
    }

    .table-of-contents {
        padding: 24px;
    }
    
    /* Lightbox mobile adjustments */
    .sg-docs-lightbox-close {
        top: -40px;
        font-size: 40px;
    }
        .sg-docs-lightbox-content {
        max-width: 95%;     /* ← Mobile width (bigger for phones) */
        max-height: 85%;    /* ← Mobile height */
    }
    
    .sgDocsLightbox Img {
        max-height: 75vh;   /* ← Mobile viewport height */
    }
    .sg-docs-lightbox-caption {
        font-size: 14px;
        bottom: -35px;
    }
}