/* =========================================================
   Online Notary Center — API Docs stylesheet
   Self-hosted fonts + ONC brand theme (matches twc.css)
   ========================================================= */

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../fonts/poppins-300.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/poppins-400.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/poppins-500.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/poppins-600.woff2") format("woff2");
}

:root {
    --web-blue: #40a1e8;
    --web-blue-dark: #2b8ad2;
    --web-blue-variant: #badaf1;
    --web-blue-soft: #eaf4fc;
    --web-yellow: #ffcb34;
    --font-black: #000;
    --bg-gray: #efefef;
    --white: #fff;
    --code-bg: #1e2a35;
    --transition: all 400ms ease;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    color: #212529;
    background: var(--white);
}

/* ---------- Top navbar ---------- */

.docs-navbar {
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}

.docs-navbar .navbar-brand img {
    height: 52px;
    width: auto;
    display: block;
}

.docs-navbar .nav-link {
    color: var(--font-black);
    font-weight: 500;
    font-size: 15px;
}

.docs-navbar .nav-link:hover {
    color: var(--web-blue);
}

/* Leaves the documentation for the interactive console, so it should read
   as a destination rather than one more anchor on this page. */
.docs-navbar .nav-console {
    color: var(--web-blue-dark);
    font-weight: 600;
}

.docs-navbar .nav-console::before {
    content: "\25B8";
    margin-right: .3rem;
}

.btn-onc {
    background-color: var(--web-yellow);
    border-color: var(--web-yellow);
    color: var(--font-black);
    font-weight: 500;
    border-radius: 30px;
    padding: .45rem 1.4rem;
    transition: var(--transition);
}

.btn-onc:hover {
    background-color: var(--web-blue);
    border-color: var(--web-blue);
    color: var(--white);
}

/* ---------- Hero ---------- */

.docs-hero {
    background: linear-gradient(135deg, var(--web-blue) 0%, var(--web-blue-dark) 100%);
    color: var(--white);
    padding: 4.5rem 0 3.5rem;
}

.docs-hero h1 {
    font-size: 40px;
    font-weight: 600;
}

.docs-hero p {
    font-size: 18px;
    font-weight: 300;
    max-width: 720px;
}

.docs-hero .badge-version {
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .45);
    font-weight: 400;
}

/* ---------- Sidebar ---------- */

.docs-sidebar {
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: .5rem;
}

.docs-sidebar .sidebar-heading {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6c757d;
    margin: 1.25rem 0 .35rem;
}

.docs-sidebar .nav-link {
    color: #333;
    font-size: 14px;
    padding: .3rem .75rem;
    border-left: 3px solid transparent;
    border-radius: 0 6px 6px 0;
}

.docs-sidebar .nav-link:hover {
    color: var(--web-blue);
    background: var(--web-blue-soft);
}

.docs-sidebar .nav-link.active {
    color: var(--web-blue);
    background: var(--web-blue-soft);
    border-left-color: var(--web-blue);
    font-weight: 500;
}

/* ---------- Content sections ---------- */

.docs-section {
    padding-top: 1rem;
    margin-bottom: 3rem;
}

.docs-section > h2 {
    font-size: 29px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.docs-section h2 .section-bar {
    display: inline-block;
    width: 8px;
    height: 26px;
    background: var(--web-yellow);
    border-radius: 3px;
    margin-right: .6rem;
}

.endpoint-card {
    border: 1px solid #e3e8ee;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    margin-bottom: 2rem;
    overflow: hidden;
}

.endpoint-card .card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e3e8ee;
    padding: .9rem 1.25rem;
}

.endpoint-card .card-header h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

.endpoint-url {
    font-family: SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    background: var(--web-blue-soft);
    border: 1px solid var(--web-blue-variant);
    border-radius: 8px;
    padding: .55rem .9rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    word-break: break-all;
}

.badge-method {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    padding: .4em .8em;
    border-radius: 6px;
}

.badge-get {
    background-color: #2e9e6b;
    color: var(--white);
}

.badge-post {
    background-color: var(--web-blue);
    color: var(--white);
}

/* ---------- Tables ---------- */

.params-table {
    font-size: 14px;
}

.params-table th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}

.params-table code {
    color: var(--web-blue-dark);
    background: var(--web-blue-soft);
    border-radius: 4px;
    padding: .1rem .35rem;
}

.required-flag {
    color: #d63939;
    font-size: 12px;
    font-weight: 500;
}

.optional-flag {
    color: #6c757d;
    font-size: 12px;
}

/* ---------- Code blocks ---------- */

.code-block {
    position: relative;
    margin-bottom: 1rem;
}

.code-block pre {
    background: var(--code-bg);
    color: #d8e2ec;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    font-size: 13px;
    line-height: 1.55;
    overflow-x: auto;
    margin: 0;
}

.code-block .code-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6c757d;
    margin-bottom: .3rem;
}

.btn-copy {
    position: absolute;
    top: 30px;
    right: 10px;
    background: rgba(255, 255, 255, .12);
    color: #d8e2ec;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    padding: .2rem .6rem;
    transition: var(--transition);
}

.btn-copy:hover {
    background: var(--web-yellow);
    color: var(--font-black);
}

.code-block .tk-key { color: #8ecbf5; }
.code-block .tk-str { color: #ffd97a; }
.code-block .tk-cmt { color: #7d8da0; }

/* ---------- Download cards ---------- */

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

.download-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e3e8ee;
    border-radius: 12px;
    background: var(--white);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    transition: var(--transition);
}

.download-card:hover {
    border-color: var(--web-blue);
    box-shadow: 0 6px 18px rgba(64, 161, 232, .18);
    transform: translateY(-2px);
    color: inherit;
}

.download-icon {
    flex: 0 0 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--web-blue-soft);
    color: var(--web-blue-dark);
    font-family: SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px;
    font-weight: 600;
}

.download-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.download-title {
    font-size: 16px;
    font-weight: 500;
}

.download-meta {
    font-size: 12px;
    color: #6c757d;
}

.download-action {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 500;
    color: var(--font-black);
    background: var(--web-yellow);
    border-radius: 20px;
    padding: .3rem .9rem;
    transition: var(--transition);
}

.download-card:hover .download-action {
    background: var(--web-blue);
    color: var(--white);
}

.docs-steps {
    font-size: 15px;
    padding-left: 1.2rem;
}

.docs-steps li {
    margin-bottom: .4rem;
}

/* ---------- Callouts ---------- */

.callout {
    border-left: 4px solid var(--web-blue);
    background: var(--web-blue-soft);
    border-radius: 0 8px 8px 0;
    padding: .8rem 1rem;
    font-size: 14px;
    margin-bottom: 1.25rem;
}

.callout.callout-warning {
    border-left-color: var(--web-yellow);
    background: #fff8e3;
}

/* ---------- Footer ---------- */

.docs-footer {
    background: #10151b;
    color: #aeb7c0;
    padding: 2.5rem 0;
    font-size: 14px;
    margin-top: 3rem;
}

.docs-footer img {
    height: 46px;
    width: auto;
}

.docs-footer a {
    color: var(--web-blue);
    text-decoration: none;
}

.docs-footer a:hover {
    color: var(--web-yellow);
}

/* ---------- Back to top ---------- */

#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1050;
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--web-blue);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    font-size: 20px;
    line-height: 1;
    transition: var(--transition);
}

#backToTop:hover {
    background: var(--web-yellow);
    color: var(--font-black);
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
    .docs-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 2rem;
        border: 1px solid #e3e8ee;
        border-radius: 12px;
        padding: 1rem;
    }

    .docs-hero h1 {
        font-size: 30px;
    }
}
