:root {
    --docs-sidebar-width: 280px;
    --docs-primary: #008060;
    --docs-bg: #0b0f19;
    --docs-card-bg: rgba(255, 255, 255, 0.03);
    --docs-border: rgba(255, 255, 255, 0.1);
}

/* Override install.css global locks */
html {
    height: auto !important;
    overflow-y: auto !important;
    scroll-behavior: smooth;
}

.documentation-section {
    scroll-margin-top: 120px;
}

body {
    background: var(--docs-bg);
    color: #e2e8f0;
    line-height: 1.6;
    margin: 0;
    font-family: 'Inter', sans-serif;
    height: auto !important;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    overflow-y: auto !important;
}

/* Fix particles to cover full scrollable area */
.particles {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1 !important;
    /* Send behind content */
    pointer-events: none;
}

.docs-layout {
    display: flex;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    /* Ensure content flows properly */
    overflow: visible;
}

/* Sidebar Navigation */
.docs-sidebar {
    width: var(--docs-sidebar-width);
    position: fixed;
    top: 0;
    height: 100vh;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--docs-border);
    overflow-y: auto;
    z-index: 10;
}

.docs-logo-text {
    font-weight: 800;
    font-size: 1.25rem;
}

.docs-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
    text-decoration: none;
    color: white;
}

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

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

.nav-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 1rem;
    font-weight: 700;
}

.nav-link {
    display: block;
    padding: 8px 12px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: white;
    background: var(--docs-primary);
    font-weight: 500;
}

/* Main Content Area */
.docs-content {
    flex: 1;
    margin-left: var(--docs-sidebar-width);
    padding: 4rem 6rem;
    max-width: 900px;
}

.docs-header {
    margin-bottom: 4rem;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
}

section {
    padding-top: 4rem;
    margin-bottom: 4rem;
    scroll-margin-top: 2rem;
}

h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

h4 {
    margin-top: 1.5rem;
    color: white;
}

h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    color: white;
    margin-top: 2rem;
}

p {
    margin-bottom: 1.25rem;
    color: #cbd5e1;
}

.card {
    background: var(--docs-card-bg);
    border: 1px solid var(--docs-border);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.card-wildcard {
    border-left: 4px solid #6366f1;
}

.card-regex {
    border-left: 4px solid #f43f5e;
}

.card-accent {
    border-top: 4px solid #4f46e5;
}

code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #fca5a5;
}

.warning-box {
    background: rgba(217, 119, 6, 0.1);
    border-left: 4px solid #d97706;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
    color: #fbbf24;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.warning-box strong {
    color: #fbbf24;
    font-weight: 600;
}

.info-box {
    background: rgba(14, 165, 233, 0.1);
    border-left: 4px solid #0ea5e9;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
    color: #e0f2fe;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.info-box strong {
    color: #7dd3fc;
    font-weight: 600;
}

.info-box span {
    color: #e0f2fe;
}

/* Redesigned Info Box (Blue variant) */
.info-box-blue {
    margin-top: 1.5rem;
    background: #e3f2fd !important;
    border-left: 4px solid #2196f3 !important;
    padding: 1.5rem;
    border-radius: 8px;
    color: #1e3a8a !important;
}

.info-box-blue h4 {
    margin-top: 0 !important;
    color: #0d47a1 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box-blue p {
    margin-bottom: 8px !important;
    color: #1e3a8a !important;
}

.info-box-blue a {
    font-weight: 600;
    color: #2196f3;
    text-decoration: none;
    border-bottom: 2px solid rgba(33, 150, 243, 0.3);
}

.img-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--docs-border);
    border-radius: 12px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.img-container img {
    width: 100%;
    display: block;
}


/* Steps List Styling */
.steps-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.steps-list li {
    margin-bottom: 0.75rem;
    color: #cbd5e1;
    padding-left: 0.5rem;
}

/* Scroll Spy Active State */
.nav-link.active {
    background: rgba(0, 128, 96, 0.2);
    color: #4ade80;
    border-left: 3px solid #4ade80;
    padding-left: 9px;
    /* Adjust for border width */
}


/* Guide Overview Grid */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.guide-card {
    display: block;
    text-decoration: none;
    background: var(--docs-card-bg);
    border: 1px solid var(--docs-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--docs-primary);
}

.guide-thumb {
    width: 100%;
    height: 140px;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.guide-card:hover .guide-thumb img {
    opacity: 1;
}

.guide-title {
    padding: 1rem;
    color: white;
    font-weight: 600;
    text-align: center;
    border-top: 1px solid var(--docs-border);
    background: rgba(0, 0, 0, 0.1);
}

/* RegEx Documentation Styles */
.regex-syntax-section {
    margin-top: 1.5rem;
}

.regex-table {
    width: 100%;
    border-collapse: collapse;
    margin-block: 0.5rem;
}

.regex-table th,
.regex-table td {
    text-align: left;
    padding: 8px;
}

.regex-table th {
    border-bottom: 1px solid var(--docs-border);
}

.regex-table td:first-child {
    width: 80px;
}

.regex-example-text {
    font-size: 0.9em;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.regex-code-block {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    margin-top: 0.5rem;
}

.regex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.regex-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #f43f5e;
}

.regex-item p {
    font-size: 0.85em;
    margin-bottom: 0.5rem;
}

/* Comparison Table Styles */
.comparison-container {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.comparison-table thead tr {
    border-bottom: 2px solid var(--docs-border);
    background: rgba(99, 102, 241, 0.05);
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: center;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
    padding: 15px;
}

.comparison-table tr {
    border-bottom: 1px solid var(--docs-border);
}

.comparison-table tr:last-child {
    border-bottom: none;
}

/* Download Button */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #000;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.download-btn:hover {
    background: #f1f5f9;
}

/* Generic Documentation Table */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin-block: 0.5rem;
}

.docs-table th,
.docs-table td {
    text-align: left;
    padding: 8px;
}

.docs-table tr {
    border-bottom: 1px solid var(--docs-border);
}

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

/* Utility Classes */
.text-red {
    color: #ef4444 !important;
}

.text-green {
    color: #10b981 !important;
}

.font-medium {
    font-weight: 500 !important;
}

.text-small-muted {
    font-size: 0.9em;
    color: #64748b;
    margin-top: 1rem;
}

/* Spacing Utilities */
.mt-05 {
    margin-top: 0.5rem !important;
}

.mt-1 {
    margin-top: 1rem !important;
}

.mt-15 {
    margin-top: 1.5rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-15 {
    margin-bottom: 1.5rem !important;
}

.ml-15 {
    margin-left: 1.5rem !important;
}

/* Colors */
.text-shopify-green {
    color: #529680ff !important;
}

/* Footer */
.docs-footer {
    margin-top: 8rem;
    padding-top: 2rem;
    border-top: 1px solid var(--docs-border);
    color: #64748b;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-sidebar {
        display: none;
    }

    .docs-content {
        margin-left: 0;
        padding: 2rem;
    }
}