/* =========================================
   Scrollbars
========================================= */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

.light ::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 999px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 999px;
}

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

#global-sidebar {
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

#global-sidebar {
    background-color: #fff;
}

.dark #global-sidebar {
    background-color: #020617;
}

aside#global-sidebar {
    border-right: 1px solid rgba(148, 163, 184, 0.18);
}

.dark aside#global-sidebar {
    border-right-color: rgba(148, 163, 184, 0.12);
}

#global-sidebar section {
    padding-bottom: 0.25rem;
}

#global-sidebar section:not(:first-child) {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.dark #global-sidebar section:not(:first-child) {
    border-top-color: rgba(148, 163, 184, 0.08);
}

/* =========================================
   CATEGORY HEADERS
========================================= */

.sidebar-category {
    display: block;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    color: #64748b;

    margin-bottom: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;

    transition: all 150ms ease;
}

.sidebar-category:hover {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.08);
}

.dark .sidebar-category {
    color: #94a3b8;
}

/* =========================================
   TOOL LINKS
========================================= */

.sidebar-tool {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: none;

    padding: 0.45rem 0.6rem;
    margin-bottom: 0.2rem;
    border-radius: 0.6rem;

    color: #475569;
    transition: all 150ms ease;
}

.sidebar-tool:hover {
    background: rgba(148, 163, 184, 0.14);
    color: #0f172a;
    transform: translateX(2px);
}

.dark .sidebar-tool {
    color: #cbd5e1;
}

.dark .sidebar-tool:hover {
    background: rgba(148, 163, 184, 0.08);
    color: white;
}

/* =========================================
   ACTIVE STATE
========================================= */

.sidebar-tool[aria-current="page"] {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
    font-weight: 600;
    border-left: 3px solid #7c3aed;
    border-radius: 0.4rem;
}

.dark .sidebar-tool[aria-current="page"] {
    background: rgba(124, 58, 237, 0.18);
    color: #c4b5fd;
}

/* =========================================
   General
========================================= */

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

.transition-theme {
    transition:
        background-color 300ms cubic-bezier(0.4, 0, 0.2, 1),
        border-color 300ms cubic-bezier(0.4, 0, 0.2, 1),
        color 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   Accessibility
========================================= */

:focus-visible {
    outline: 3px solid #a855f7;
    outline-offset: 2px;
    border-radius: 6px;
}

/* =========================================
   Select Menus
========================================= */

select option {
    background-color: #0b1220;
    color: #e2e8f0;
}

html.light select option {
    background-color: white;
    color: black;
}

/* =========================================
   Content Layout
========================================= */

.content-section {
    max-width: 75ch;
    margin-inline: auto;
}

.content-section p {
    line-height: 1.8;
}

/* =========================================
   Headings
========================================= */

.content-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

/* =========================================
   Tool Information Cards
========================================= */

.info-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.info-card {
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background: white;
}

.dark .info-card {
    background: #111827;
    border-color: #374151;
}

.info-card h3 {
    margin-top: 0;
}

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

.faq {
    margin-top: 1rem;
}

.faq details {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: white;
}

.dark .faq details {
    background: #111827;
    border-color: #374151;
}

.faq summary {
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    padding: 1rem 1.25rem;
    user-select: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq details p {
    padding: 0 1.25rem 1rem;
    margin: 0;
}

.faq details[open] summary {
    border-bottom: 1px solid #e2e8f0;
}

.dark .faq details[open] summary {
    border-bottom-color: #374151;
}

/* =========================================
   Code / Examples
========================================= */

.content-section pre {
    overflow-x: auto;
    padding: 1rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.dark .content-section pre {
    background: #0f172a;
    border-color: #374151;
}

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

.content-section table {
    width: 100%;
    border-collapse: collapse;
}

.content-section th,
.content-section td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
}

.dark .content-section th,
.dark .content-section td {
    border-color: #374151;
}

/* =========================================
   Tables (Updated)
========================================= */

.content-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0; 
    text-align: center;
}

.content-section caption {
    margin-bottom: 1rem;
    font-weight: 600;
}

.content-section thead {
    background-color: #f8fafc;
}

.dark .content-section thead {
    background-color: #1e293b;
}

.content-section th,
.content-section td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
}

.dark .content-section th,
.dark .content-section td {
    border-color: #374151;
    text-align: center;
}

.content-section td {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.tool-example-table th,
.tool-example-table td {    
    text-align: center !important;
}