﻿/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    font-size: 100%;
    vertical-align: baseline;
}

html {
    line-height: 1;
}

ol, ul {
    list-style: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

caption, th, td {
    text-align: left;
    font-weight: normal;
    vertical-align: middle;
}

q, blockquote {
    quotes: none;
}

    q:before, q:after, blockquote:before, blockquote:after {
        content: "";
        content: none;
    }

a img {
    border: none;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
    display: block;
}

@font-face {
    font-family: "EratoReg";
    src: url("/documentation/fonts/EratoReg-webfont.eot");
    src: url("/documentation/fonts/EratoReg-webfont.eot?#iefix") format("embedded-opentype"), url("/documentation/fonts/EratoReg-webfont.woff") format("woff"), url("/documentation/fonts/EratoReg-webfont.ttf") format("truetype"), url("/documentation/fonts/EratoReg-webfont.svg#erato-regularregular") format("svg");
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #059669;
    --accent-color: #d97706;
    --text-dark: #1a2233;
    --text-medium: #4a5568;
    --text-light: #6b7280;
    --background-light: #ffffff;
    --background-subtle: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --border-radius: 0.5rem;
    --border-radius-large: 1rem;
}

html {
    height: 100%;
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    background: var(--background-subtle);
    height: 100%;
    padding: 0;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    margin-top: 0;
    color: var(--text-dark);
    line-height: 1.2;
}

    h1 em {
        font-weight: 700;
        color: var(--primary-color);
    }

h2 {
    margin-bottom: 1rem;
    margin-top: 2rem;
    font-weight: 600;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.3;
}

h3 {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

    h3.custom {
        font-weight: 600;
        font-size: 1.25rem;
        color: var(--accent-color);
    }

#page-wrapper {
    max-width: 1200px;
    padding: 0 1rem;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--background-light);
    position: relative;
    padding-bottom: 6rem;
    box-shadow: var(--shadow-large);
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    #page-wrapper {
        padding: 0 2rem;
        border-radius: var(--border-radius);
        margin: 1rem auto;
        min-height: calc(100vh - 2rem);
    }
}

a {
    cursor: pointer !important;
}

#logo-bar {
    background: var(--background-light);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

    #logo-bar a.logo {
        display: inline-block;
        transition: opacity 0.2s ease;
    }

    #logo-bar a.logo:hover {
        opacity: 0.8;
    }

    #logo-bar img {
        height: 60px;
        width: auto;
    }

footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    background: var(--background-subtle);
}

    footer span {
        font-size: 0.875rem;
        color: var(--text-light);
    }

nav#site-nav {
    background: var(--background-light);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

    nav#site-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        list-style: none;
    }

    nav#site-nav li {
        margin: 0;
    }

        nav#site-nav li a {
            color: var(--text-medium);
            text-decoration: none;
            display: inline-block;
            padding: 0.75rem 1.5rem;
            border-radius: var(--border-radius);
            font-weight: 500;
            font-size: 0.95rem;
            transition: all 0.2s ease;
            position: relative;
        }

            nav#site-nav li a:hover {
                color: var(--primary-color);
                background-color: rgba(37, 99, 235, 0.1);
            }

            nav#site-nav li a.active {
                color: var(--primary-color);
                background-color: rgba(37, 99, 235, 0.1);
                font-weight: 600;
            }

            nav#site-nav li a:focus {
                outline: 2px solid var(--primary-color);
                outline-offset: 2px;
            }

article {
    background: var(--background-light);
    flex: 1;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 992px) {
    article:not(.homepage) {
        flex-direction: row;
        gap: 3rem;
    }
}

    article section {
        padding: 1rem 0;
    }

    article .text-content, article nav {
        line-height: 1.7;
    }

        article .text-content strong, article nav strong {
            font-weight: 600;
        }

    article .text-content {
        flex: 1;
        min-width: 0;
    }

    @media (min-width: 992px) {
        article .text-content {
            flex: 2;
        }
    }

.api-content .text-content {
    background: var(--background-subtle);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    padding: 2.5rem 2rem;
}

.api-content .text-content section {
    margin-bottom: 2rem;
}

.api-content .text-content section:last-child {
    margin-bottom: 0;
}

        article .text-content table {
            width: 100%;
            margin-bottom: 2rem;
            border-collapse: collapse;
            background: var(--background-light);
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow-light);
        }

            article .text-content table tr:nth-child(even) td {
                background: var(--background-subtle);
            }

            article .text-content table td {
                padding: 1rem;
                font-weight: 400;
                border-bottom: 1px solid var(--border-color);
            }

            article .text-content table tr:last-child td {
                border-bottom: none;
            }

                article .text-content table td:first-child {
                    color: var(--text-dark);
                    font-weight: 600;
                }

        article .text-content a {
            color: var(--primary-color);
            text-decoration: none;
            border-bottom: 1px solid transparent;
            transition: border-color 0.2s ease;
        }

        article .text-content a:hover {
            border-bottom-color: var(--primary-color);
        }

        article .text-content p {
            margin-top: 1rem;
            color: var(--text-medium);
        }

            article .text-content p:first-child {
                font-size: 1.125rem;
                line-height: 1.6;
                color: var(--text-medium);
                margin-bottom: 1.5rem;
                font-weight: 400;
            }

            article .text-content p + h2 {
                margin-top: 2.5rem;
            }

    article nav {
        flex: 0 0 280px;
        background: var(--background-subtle);
        border-radius: var(--border-radius);
        padding: 1.5rem;
        height: fit-content;
        position: sticky;
        top: 120px;
        box-shadow: var(--shadow-light);
    }

    @media (max-width: 991px) {
        article nav {
            position: static;
            flex: none;
            order: -1;
        }
    }

        article nav.fixed {
            position: fixed;
            top: 120px;
            right: 2rem;
            width: 280px;
        }

        article nav.fixed-bottom {
            bottom: 2rem;
            top: auto;
        }

        article nav ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        article nav li {
            margin-bottom: 0.25rem;
        }

            article nav li.h3 {
                font-size: 0.875rem;
                padding-left: 1rem;
            }

                article nav li.h3 a {
                    font-weight: 400;
                    color: var(--text-light);
                }

                article nav li.h3 + li.h2 {
                    margin-top: 0.75rem;
                }

        article nav a {
            color: var(--text-medium);
            text-decoration: none;
            display: block;
            padding: 0.5rem 0.75rem;
            border-radius: calc(var(--border-radius) / 2);
            font-weight: 500;
            font-size: 0.9rem;
            transition: all 0.2s ease;
        }

            article nav a:hover {
                color: var(--primary-color);
                background-color: rgba(37, 99, 235, 0.1);
            }

            article nav a.active {
                color: var(--primary-color);
                background-color: rgba(37, 99, 235, 0.15);
                font-weight: 600;
            }

            article nav a.top-link {
                display: block;
                margin-bottom: 1.5rem;
                text-align: center;
                background: var(--primary-color);
                color: white;
                font-weight: 600;
            }

            article nav a.top-link:hover {
                background: rgba(37, 99, 235, 0.9);
                color: white;
            }

    article .text-content li {
        list-style: disc outside none;
    }

    article .text-content ul {
        padding-left: 30px;
    }

code {
    font-size: 0.875rem;
    background: var(--background-subtle);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    color: var(--text-dark);
    font-family: 'Fira Code', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.button, .button--light {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.button:hover {
    background: rgba(37, 99, 235, 0.9);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.button--light {
    background: var(--background-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.button--light:hover {
    background: var(--background-subtle);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* Homepage Styles */
.homepage {
    padding: 2.5rem 0 3rem 0;
}

.homepage .hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.homepage .hero h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.homepage .hero-description {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.homepage .key-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.homepage .key-features.single-column {
    display: block;
}

.homepage .key-features.single-column .feature {
    margin-bottom: 2rem;
}

.homepage .key-features .feature {
    background: var(--background-subtle);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    padding: 2rem 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.homepage .key-features .feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.homepage .key-features .feature h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 0;
}

.homepage .key-features .feature:nth-child(1) h2 {
    color: var(--primary-color);
}

.homepage .key-features .feature:nth-child(2) h2 {
    color: var(--secondary-color);
}

.homepage .key-features .feature:nth-child(3) h2 {
    color: var(--accent-color);
}

.homepage .key-features .feature ul {
    list-style: none;
    padding: 0;
    color: var(--text-medium);
}

.homepage .key-features .feature li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.homepage .key-features .feature li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 600;
}

.homepage .cta {
    background: var(--background-subtle);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-light);
}

.homepage .cta h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.homepage .cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

@media (max-width: 640px) {
    .homepage .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .homepage .cta-buttons .button {
        width: 100%;
        max-width: 280px;
    }
}

/* API Reference Page Styles */
.api-reference-page {
    background: var(--background-light);
    padding: 2rem 0;
}

.api-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 992px) {
    .api-content {
        flex-direction: row;
        gap: 3rem;
    }
    
    .api-content .text-content {
        flex: 2;
    }
    
    .api-content .quick-nav {
        flex: 0 0 280px;
    }
}

.api-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.api-header h1 {
    margin-bottom: 0.5rem;
}

.api-header .version {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.api-description {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
}

.endpoint {
    color: var(--secondary-color);
    font-weight: 600;
}

.response-codes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.response-codes li {
    padding: 0.5rem;
    background: var(--background-subtle);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

/* Versions Page Styles */
.versions-page {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--background-subtle);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
}

.page-description {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
}

.current-version,
.versioning-policy,
.version-history {
    margin-bottom: 2.5rem;
}

.version-info {
    background: rgba(37, 99, 235, 0.05);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.version-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.version-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status.active {
    background: rgba(5, 150, 105, 0.1);
    color: var(--secondary-color);
}

.version-features {
    list-style: none;
    padding: 0;
}

.version-features li {
    padding: 0.25rem 0;
    color: var(--text-medium);
}

.version-features li::before {
    content: "•";
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.policy-list {
    color: var(--text-medium);
    padding-left: 1.5rem;
}

.policy-list li {
    margin-bottom: 0.5rem;
}

.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.versions-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background-light);
}

.versions-table th {
    background: var(--background-subtle);
    color: var(--text-dark);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.versions-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-medium);
}

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

span.flash, span.new {
    display: inline-block;
    color: white;
    text-transform: uppercase;
    padding: 0 0.5em;
    font-size: 0.9em;
    margin-right: 0.5em;
    background-color: #00A9B7;
}

.new:before {
    content: "NEW ";
}

pre {
    overflow: auto;
}

/* Ensure code blocks maintain proper theming */
.api-content pre {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155;
}

.api-content pre code {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
}

article .text-content .filter-link {
    display: block;
    margin-top: -4px;
    font-size: 12px;
    font-weight: normal;
}
