/* ============================================================
   Selcom Business — Developer Portal CSS
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────── */
:root {
    --dp-sidebar-width: 268px;
    --dp-sidebar-bg: #ffffff;
    --dp-sidebar-text: #495057;
    --dp-sidebar-text-hover: #070707;
    --dp-sidebar-active-bg: rgba(66, 66, 66, 0.1);
    --dp-sidebar-active-text: #070707;
    --dp-sidebar-active-border: #070707;
    --dp-sidebar-group-label: #6c757d;
    /* --dp-sidebar-header-bg: rgba(66, 66, 66, 0.1); */
    --dp-sidebar-header-bg: #ECECEC;
    --dp-topbar-height: 56px;

    --dp-main-bg: #ECECEC;
    /* --dp-main-bg: #f5f5f5; */
    --dp-content-bg: #ffffff;
    --dp-border: #e2e8f0;
    --dp-border-light: #f1f5f9;
    --dp-text: #1e293b;
    --dp-text-muted: #64748b;
    --dp-link: #6366f1;

    --dp-code-bg: #1e293b;
    --dp-code-border: #334155;
    --dp-code-text: #e2e8f0;
    --dp-code-header-bg: #151f32;

    --dp-radius: 8px;
    --dp-section-gap: 2.5rem;
    --dp-transition: 0.2s ease;

    /* Scroll offset: desktop = no topbar, mobile = topbar height */
    --dp-scroll-offset: 1.5rem;
}

/* ── Reset / Base ───────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--dp-scroll-offset);
}

body {
    font-family:
        "Poppins",
        "Segoe UI",
        system-ui,
        -apple-system,
        sans-serif;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--dp-text);
    background: var(--dp-main-bg);
    margin: 0;
    /* Prevent any child element from causing full-page horizontal scroll */
    overflow-x: hidden;
}

/* ── Sidebar ────────────────────────────────────────────── */
.dp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--dp-sidebar-width);
    height: 100vh;
    background: var(--dp-sidebar-bg);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 200;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #1e3a5f transparent;
}

.dp-sidebar::-webkit-scrollbar {
    width: 4px;
}
.dp-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.dp-sidebar::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 2px;
}

/* Sidebar header */
.dp-sidebar-header {
    padding: 1.5rem 1.25rem 1.25rem;
    background: var(--dp-sidebar-header-bg);
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.dp-logo {
    height: 42px;
    width: auto;
    margin-bottom: 0.5rem;
    display: block;
}

.dp-sidebar-brand-text {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.dp-sidebar-sub {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.125rem;
    letter-spacing: 0.02em;
}

/* Sidebar nav */
.dp-nav {
    padding: 0.75rem 0;
    flex: 1;
}

.dp-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dp-nav-group-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dp-sidebar-group-label);
    padding: 1rem 1.25rem 0.35rem;
}

.dp-nav-item {
    position: relative;
}

.dp-nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    /* padding: 0.45rem 1.25rem; */
    padding: 12px 16px;
    color: var(--dp-sidebar-text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition:
        color var(--dp-transition),
        background var(--dp-transition);
}

.dp-nav-link i {
    font-size: 1rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.dp-nav-link:hover {
    color: var(--dp-sidebar-text-hover);
    background: var(--dp-sidebar-active-bg);
    text-decoration: none;
    padding-left: 1.5rem;
}

.dp-nav-link.active {
    color: var(--dp-sidebar-active-text);
    background: var(--dp-sidebar-active-bg);
    border-left-color: var(--dp-sidebar-active-border);
    font-weight: 600;
}

.dp-nav-link.active i {
    opacity: 1;
}

/* Sub nav */
.dp-nav-sub {
    list-style: none;
    padding: 0.125rem 0 0.125rem 2.75rem;
    margin: 0;
    border-left: none;
    display: none;
}

.dp-nav-item.open > .dp-nav-sub {
    display: block;
}

.dp-nav-link-has-sub::after {
    content: '\F282'; /* bi-chevron-down */
    font-family: 'bootstrap-icons';
    font-size: 0.75rem;
    margin-left: auto;
    opacity: 0.6;
    transition: transform var(--dp-transition);
}

.dp-nav-item.open > .dp-nav-link-has-sub::after {
    transform: rotate(180deg);
}

.dp-nav-sub li {
    position: relative;
}

.dp-nav-sublink {
    display: block;
    padding: 0.3rem 1rem;
    font-size: 0.8125rem;
    color: var(--dp-sidebar-text);
    text-decoration: none;
    border-radius: 4px;
    transition: color var(--dp-transition);
}

.dp-nav-sublink:hover,
.dp-nav-sublink.active {
    color: #070707;
    font-weight: 600;
}

/* ── Mobile Topbar ──────────────────────────────────────── */
.dp-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    height: var(--dp-topbar-height);
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    gap: 0.5rem;
}

.dp-hamburger {
    background: none;
    border: none;
    color: #495057;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: color var(--dp-transition);
    flex-shrink: 0;
}

.dp-hamburger:hover {
    color: #070707;
}

.dp-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
}

.dp-logo-small {
    height: 22px;
    width: auto;
    flex-shrink: 0;
}

.dp-brand-fallback {
    color: #1e293b;
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
}

.dp-topbar-title {
    color: #6c757d;
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Offcanvas ──────────────────────────────────────────── */
.dp-offcanvas {
    background: #ffffff;
    border-right: 1px solid #e9ecef;
    width: 280px !important;
    max-width: 85vw !important;
}

.dp-offcanvas .offcanvas-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* ── Main Content ───────────────────────────────────────── */
.dp-main {
    margin-left: var(--dp-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Prevent overflowing children from widening the main area */
    min-width: 0;
    overflow-x: hidden;
    max-width: 100%;
}

.dp-content-inner {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0.5rem auto 0;
    padding: 0.5rem 2rem 3rem;
    /* Prevent any child from blowing out the column */
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ── Section ────────────────────────────────────────────── */
.dp-section {
    padding-bottom: var(--dp-section-gap);
    border-bottom: 1px solid var(--dp-border);
    margin-bottom: var(--dp-section-gap);
}

.dp-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.dp-section-header {
    margin-bottom: 1.25rem;
}

/* Full-width hero header above dp-content-inner */
.dp-page-hero {
    background-color: #3D3D3D;
    background-image: url('../../../img/nav-bg.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    width: 100%;
}

.dp-page-hero-inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.dp-page-hero .dp-page-title {
    color: #ffffff;
}

.dp-page-hero .dp-lead {
    color: rgba(255, 255, 255, 0.75);
}

.dp-page-hero .dp-badge-info {
    background: rgba(219, 234, 254, 0.2);
    color: #93c5fd;
}

.dp-page-title {
    font-size: 2rem;
    font-weight: normal;
    color: var(--dp-text);
    margin: 0.375rem 0 0.75rem;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.dp-section-title {
    font-size: 1.5rem;
    font-weight: normal;
    color: var(--dp-text);
    margin: 0.375rem 0 0.75rem;
    letter-spacing: -0.02em;
}

.dp-subsection-title {
    font-size: 1rem;
    font-weight: normal;
    color: var(--dp-text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--dp-border-light);
}

.dp-subsection-anchor {
    scroll-margin-top: var(--dp-scroll-offset);
}

.dp-lead {
    font-size: 1.0625rem;
    color: var(--dp-text-muted);
    line-height: 1.75;
    margin-bottom: 0;
}

.dp-section-desc {
    font-size: 0.9375rem;
    color: var(--dp-text-muted);
    margin-bottom: 0;
}

/* ── Badges ─────────────────────────────────────────────── */
.dp-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    vertical-align: middle;
}

.dp-badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}
.dp-badge-success {
    background: #fff1ed;
    color: #ffaa90;
}
.dp-badge-warning {
    background: #fef9c3;
    color: #a16207;
}
.dp-badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

.dp-badge-danger-sm {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    background: #fee2e2;
    color: #b91c1c;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    white-space: nowrap;
}
.dp-badge-secondary-sm {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    white-space: nowrap;
}
.dp-badge-optional-sm {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    background: #fffbeb;
    color: #92400e;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    white-space: nowrap;
}
.dp-badge-success-sm {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    background: #fff1ed;
    color: #ffaa90;
    padding: 0.15em 0.5em;
    border-radius: 5px;
    white-space: nowrap;
}

/* ── Feature Cards ──────────────────────────────────────── */
.dp-feature-card {
    background: #fff;
    /* border: 1px solid var(--dp-border); */
    border-radius: 12px;
    padding: 1.25rem;
    height: 100%;
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.08); */
    /* transition: box-shadow var(--dp-transition), transform var(--dp-transition); */
}

/* .dp-feature-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
} */

.dp-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #eef2ff;
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.875rem;
    flex-shrink: 0;
}

.dp-feature-card h6 {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--dp-text);
    margin-bottom: 0.375rem;
}

.dp-feature-card p {
    font-size: 0.875rem;
    color: var(--dp-text-muted);
    margin: 0;
}

/* ── Endpoint Badge ─────────────────────────────────────── */
.dp-endpoint-badge {
    display: flex; /* block-level, not inline */
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: var(--dp-code-bg);
    border: 1px solid var(--dp-code-border);
    border-radius: var(--dp-radius);
    padding: 0.75rem 1.125rem;
    margin: 0.5rem 0 0.25rem;
    width: 100%;
    max-width: 100%;
}

.dp-method {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.25em 0.7em;
    border-radius: 4px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.dp-method-post {
    background: #1d4ed8;
    color: #fff;
}
.dp-method-get {
    background: #15803d;
    color: #fff;
}

.dp-endpoint-url {
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
    font-size: 0.9rem;
    color: #a5b4fc;
    word-break: break-all;
    min-width: 0;
    flex: 1;
}

.dp-param-inline {
    color: #fbbf24;
}

/* ── Callouts ───────────────────────────────────────────── */
.dp-callout {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.875rem 1rem;
    border-radius: var(--dp-radius);
    font-size: 0.875rem;
    line-height: 1.65;
}

.dp-callout > i {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.dp-callout-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}
.dp-callout-warning {
    background: #fefce8;
    border: 1px solid #fde68a;
    color: #92400e;
}
.dp-callout-dark {
    background: var(--dp-code-bg);
    border: 1px solid var(--dp-code-border);
    color: var(--dp-code-text);
    border-radius: var(--dp-radius);
    padding: 1rem 1.25rem;
}

.dp-formula {
    font-family: "SFMono-Regular", "Consolas", monospace;
    font-size: 0.875rem;
    color: #93c5fd;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* ── Tables ─────────────────────────────────────────────── */
.dp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    max-width: 100%;
}

.dp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: #ffffff;
    margin: 0;
    min-width: 480px;
}

.dp-table thead tr {
    background: #f2f4fa;
    border-bottom: 1px solid #e2e8f0;
}

.dp-table thead th {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #000000;
    white-space: nowrap;
    text-align: left;
}

.dp-table tbody tr {
    border-bottom: 1px solid #e9ecef;
}

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

.dp-table tbody td {
    padding: 0.75rem 0.875rem;
    color: var(--dp-text);
    vertical-align: middle;
    line-height: 1.6;
}

/* Let the description column wrap rather than forcing a wide table */
.dp-table tbody td:last-child {
    white-space: normal;
}

.dp-table-striped tbody tr:nth-child(odd) {
    background: #003366;
}

.dp-cell-muted {
    color: var(--dp-text-muted);
    font-size: 0.8125rem;
}

/* ── Bootstrap tables inside dp-table-wrap: match dp-table style ── */
.dp-table-wrap .table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.875rem;
    margin: 0;
}

.dp-table-wrap .table thead tr {
    background: #f2f4fa;
    border-bottom: 1px solid #e2e8f0;
}

.dp-table-wrap .table thead th {
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    font-weight: 700;
    color: #000000;
    white-space: nowrap;
    border: none;
    background-color: #f2f4fa !important;
}

.dp-table-wrap .table tbody tr {
    border-bottom: 1px solid #e9ecef;
    background-color: transparent !important;
}

.dp-table-wrap .table tbody tr:last-child {
    border-bottom: none;
}

.dp-table-wrap .table tbody td {
    padding: 0.75rem 0.875rem;
    vertical-align: middle;
    font-size: 0.875rem;
    border: none;
    background-color: transparent !important;
}

.dp-table-wrap .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: transparent !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-bg-state: transparent !important;
}

.dp-table-wrap .table-hover > tbody > tr:hover,
.dp-table-wrap .table-hover > tbody > tr:hover > td,
.dp-table-wrap .table-hover > tbody > tr:hover > th {
    background-color: transparent !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-bg-state: transparent !important;
    --bs-table-color-state: inherit !important;
}

/* ── Code Blocks ────────────────────────────────────────── */
.dp-code-block {
    background: var(--dp-code-bg);
    border: 1px solid var(--dp-code-border);
    border-radius: var(--dp-radius);
    overflow: hidden;
    margin: 0;
    max-width: 100%;
    /* Force the block to stay within its container */
    contain: inline-size;
}

/* .dp-code-block.dp-code-success { border-color: #ffd4c2; } */
/* .dp-code-block.dp-code-error   { border-color: #fecaca; } */

.dp-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--dp-code-header-bg);
    border-bottom: 1px solid var(--dp-code-border);
    flex-wrap: wrap;
}

/* .dp-code-success .dp-code-header { border-bottom-color: #ffd4c2; } */
/* .dp-code-error   .dp-code-header { border-bottom-color: #fecaca; } */

.dp-code-lang {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dp-code-block pre {
    margin: 0;
    padding: 1rem 1.125rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
    /* Let the block scroll instead of overflowing the page */
    max-width: 100%;
}

.dp-code-block pre::-webkit-scrollbar {
    height: 4px;
}
.dp-code-block pre::-webkit-scrollbar-track {
    background: transparent;
}
.dp-code-block pre::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 2px;
}

.dp-code-block code {
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
    font-size: 0.8125rem;
    color: var(--dp-code-text);
    background: none;
    padding: 0;
    line-height: 1.75;
    white-space: pre;
    display: block;
}

/* Copy button */
.dp-copy-btn {
    background: none;
    border: 1px solid #334155;
    border-radius: 4px;
    color: #64748b;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition:
        background var(--dp-transition),
        color var(--dp-transition),
        border-color var(--dp-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.dp-copy-btn:hover {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
}

.dp-copy-btn.copied {
    background: #ffffff;
    color: #000000;
    border-color: #313131;
}

/* ── Inline code elements ───────────────────────────────── */

code.dp-inline-code,
code:not([class]) {
    background: #f1f5f9;
    color: #1e293b;
    padding: 0.1em 0.35em;
    border-radius: 3px;
    font-size: 0.875em;
    font-family: "SFMono-Regular", "Consolas", monospace;
    word-break: break-all;
}
pre code {
    padding: 1rem !important;
}
.dp-param {
    background: #ffffff;
    color: #0f172a;
    padding: 0.1em 0.35em;
    border-radius: 3px;
    font-size: 0.8125rem;
    font-family: "SFMono-Regular", "Consolas", monospace;
    font-weight: 600;
    word-break: break-all;
}

.dp-type {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #268c4d;
    background: #ebfff3;
    padding: 0.15em 0.45em;
    border-radius: 5px;
    font-family: "SFMono-Regular", monospace;
    white-space: nowrap;
}

.dp-code-tag {
    background: #ebfff3;
    color: #268c4d;
    padding: 0.1em 0.4em;
    border-radius: 3px;
    font-size: 0.8125rem;
    font-family: "SFMono-Regular", "Consolas", monospace;
    font-weight: 600;
    word-break: break-all;
}

.dp-code-success-tag {
    background: #fff1ed;
    color: #ffaa90;
}

/* ── Status badges ──────────────────────────────────────── */
.dp-status {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    font-family: monospace;
    white-space: nowrap;
}

.dp-status-2xx {
    background: #fff1ed;
    color: #ffaa90;
}
.dp-status-4xx {
    background: #fee2e2;
    color: #991b1b;
}
.dp-status-5xx {
    background: #fce7f3;
    color: #9d174d;
}

/* ── Transaction status pills ───────────────────────────── */
.dp-txn-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.25em 0.7em;
    border-radius: 999px;
    white-space: nowrap;
}

.dp-txn-accepted {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.dp-txn-completed {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.dp-txn-failed {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ── Tabs ───────────────────────────────────────────────── */
.dp-tabs {
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    overflow: hidden;
    max-width: 100%;
}

.dp-tab-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8fafc;
    border-bottom: 1px solid var(--dp-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
}

.dp-tab-list::-webkit-scrollbar {
    display: none;
}

.dp-tab-btn {
    background: none;
    border: none;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dp-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition:
        color var(--dp-transition),
        border-color var(--dp-transition);
    flex-shrink: 0;
}

.dp-tab-btn:hover {
    color: var(--dp-text);
}
.dp-tab-btn.active {
    color: var(--dp-link);
    border-bottom-color: var(--dp-link);
}

.dp-tab-panel {
    display: none;
}
.dp-tab-panel.active {
    display: block;
}
.dp-tab-panel .dp-code-block {
    border: none;
    border-radius: 0;
}

/* ── JSON syntax highlighting ───────────────────────────── */
.dp-json-key {
    color: #1e293b;
}
.dp-json-string {
    color: #1e293b;
}
.dp-json-number {
    color: #1e293b;
}
.dp-json-boolean {
    color: #1e293b;
}
.dp-json-null {
    color: #1e293b;
}

/* ── Lists & Steps ──────────────────────────────────────── */
.dp-list {
    padding-left: 1.25rem;
    color: var(--dp-text);
}

.dp-list li {
    margin-bottom: 0.375rem;
    line-height: 1.7;
}

.dp-steps {
    counter-reset: steps;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dp-steps li {
    counter-increment: steps;
    display: flex;
    gap: 0.875rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--dp-border-light);
    line-height: 1.65;
    align-items: flex-start;
}

.dp-steps li:last-child {
    border-bottom: none;
}

.dp-steps li::before {
    content: counter(steps);
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: #268c4d;
    color: #ffffff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.15em;
}

/* ── Step Cards (Getting Started) ───────────────────────── */
.dp-steps-grid {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    counter-reset: dp-steps;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dp-step-card {
    counter-increment: dp-steps;
    display: grid;
    grid-template-columns: 26px 1fr;
    column-gap: 0.75rem;
    background: #ffffff;
    border: 1px solid var(--dp-border);
    border-left: 3px solid #268c4d;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: box-shadow 0.15s ease;
}

.dp-step-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

/* Circle sits in grid column 1, row 1 only */
.dp-step-card::before {
    content: counter(dp-steps);
    grid-column: 1;
    grid-row: 1;
    width: 26px;
    height: 26px;
    background: #268c4d;
    color: #fff;
    border-radius: 50%;
    font-size: 0.775rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
}

/* Title, desc, tags all go in column 2 and auto-stack in rows */
.dp-step-title,
.dp-step-desc,
.dp-step-tags {
    grid-column: 2;
}

.dp-step-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dp-text);
    line-height: 1.4;
    margin: 0 0 0.25rem;
    width: 100%;
}

.dp-step-desc {
    font-size: 0.845rem;
    color: var(--dp-text-muted);
    line-height: 1.6;
    margin: 0;
}

.dp-step-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.dp-step-tags code {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid var(--dp-border);
    border-radius: 4px;
    padding: 0.1em 0.5em;
    font-size: 0.77rem;
    white-space: nowrap;
    font-family: "Courier New", Courier, monospace;
}

/* ── Links ──────────────────────────────────────────────── */
.dp-link {
    color: var(--dp-link);
    text-decoration: none;
    font-weight: 500;
}

.dp-link:hover {
    text-decoration: underline;
}

/* ── Example blocks ─────────────────────────────────────── */
.dp-example-block {
    background: #fff;
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    overflow: hidden;
    padding: 0;
}

.dp-example-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--dp-text-muted);
    padding: 0.625rem 0.875rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--dp-border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dp-example-block > .row {
    padding: 0.75rem;
    margin: 0 !important; /* override Bootstrap row negative margins inside example block */
}

/* ── Empty state ────────────────────────────────────────── */
.dp-empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--dp-text-muted);
    background: #f8fafc;
    border: 1px dashed var(--dp-border);
    border-radius: var(--dp-radius);
}

.dp-empty-state i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

.dp-empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

/* ── Footer ─────────────────────────────────────────────── */
.dp-footer {
    border-top: 1px solid var(--dp-border);
    background: #fff;
    flex-shrink: 0;
}

.dp-footer-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    font-size: 0.8125rem;
    color: var(--dp-text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dp-footer-version {
    background: #f1f5f9;
    padding: 0.15em 0.6em;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

/* ============================================================
   RESPONSIVE — Tablets (landscape) : 992px – 1199px
   ============================================================ */
@media (max-width: 1199.98px) and (min-width: 992px) {
    :root {
        --dp-sidebar-width: 240px;
    }

    .dp-content-inner {
        padding: 2rem 1.5rem 2.5rem;
    }

    .dp-page-hero-inner {
        padding: 2rem 1.5rem;
    }
}

/* ============================================================
   RESPONSIVE — Tablets (portrait) and below : < 992px
   ============================================================ */
@media (max-width: 991.98px) {
    /* Account for the fixed topbar in scroll anchoring */
    :root {
        --dp-scroll-offset: calc(var(--dp-topbar-height) + 0.75rem);
    }

    html {
        scroll-padding-top: var(--dp-scroll-offset);
    }

    /* Sidebar hidden — main takes full width */
    .dp-main {
        margin-left: 0;
        padding-top: var(--dp-topbar-height);
    }

    .dp-content-inner {
        padding: 1.75rem 1.25rem 2.5rem;
    }

    .dp-page-hero-inner {
        padding: 1.75rem 1.25rem;
    }

    .dp-footer-inner {
        padding: 1rem 1.25rem;
    }

    /* Typography scale-down */
    .dp-page-title {
        font-size: 1.625rem;
    }
    .dp-section-title {
        font-size: 1.25rem;
    }
    .dp-lead {
        font-size: 1rem;
    }

    /* Section spacing */
    :root {
        --dp-section-gap: 2rem;
    }

    /* Code font — slightly smaller so lines break less on mid-size tablets */
    .dp-code-block code {
        font-size: 0.8rem;
    }

    /* Feature card row — 2 columns on tablet instead of 3 */
    .dp-feature-row .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Endpoint URL: allow wrapping */
    .dp-endpoint-url {
        font-size: 0.85rem;
        word-break: break-all;
    }
}

/* ============================================================
   RESPONSIVE — Small tablets / large phones : < 768px
   ============================================================ */
@media (max-width: 767.98px) {
    .dp-content-inner {
        padding: 1.5rem 1rem 2rem;
    }

    .dp-page-hero-inner {
        padding: 1.5rem 1rem;
    }

    /* Typography */
    .dp-page-title {
        font-size: 1.5rem;
        letter-spacing: -0.02em;
    }
    .dp-section-title {
        font-size: 1.125rem;
    }
    .dp-subsection-title {
        font-size: 0.9375rem;
        margin-top: 1.5rem;
    }
    .dp-lead {
        font-size: 0.9375rem;
    }
    .dp-section-desc {
        font-size: 0.875rem;
    }

    /* Section gap */
    :root {
        --dp-section-gap: 1.75rem;
    }

    /* Feature cards: stack to 1 column */
    .dp-feature-row .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Tables: reduce cell padding and allow description wrapping */
    .dp-table thead th {
        padding: 0.5rem 0.75rem;
        font-size: 0.6875rem;
    }
    .dp-table tbody td {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    /* Code blocks: smaller font for more content per line */
    .dp-code-block code {
        font-size: 0.75rem;
        line-height: 1.7;
    }
    .dp-code-header {
        padding: 0.4rem 0.75rem;
    }
    .dp-code-block pre {
        padding: 0.875rem 0.875rem;
    }

    /* Callout */
    .dp-callout {
        font-size: 0.8125rem;
        padding: 0.75rem 0.875rem;
    }

    /* Steps */
    .dp-steps li {
        gap: 0.75rem;
    }

    /* Example blocks: stack request/response panels vertically */
    .dp-example-block > .row {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    /* Tabs */
    .dp-tab-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    /* Endpoint */
    .dp-endpoint-badge {
        padding: 0.625rem 0.875rem;
        gap: 0.5rem;
    }
    .dp-endpoint-url {
        font-size: 0.8rem;
    }

    /* Footer */
    .dp-footer-inner {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
}

/* ============================================================
   RESPONSIVE — Mobile phones : < 576px
   ============================================================ */
@media (max-width: 575.98px) {
    .dp-content-inner {
        padding: 1.25rem 0.875rem 1.75rem;
    }

    /* Typography */
    .dp-page-title {
        font-size: 1.375rem;
    }
    .dp-section-title {
        font-size: 1.0625rem;
    }
    .dp-lead {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    /* Code blocks: smallest font */
    .dp-code-block code {
        font-size: 0.7rem;
        line-height: 1.65;
    }
    .dp-code-block pre {
        padding: 0.75rem;
    }

    /* Tables */
    .dp-table thead th {
        padding: 0.4rem 0.625rem;
        font-size: 0.625rem;
    }
    .dp-table tbody td {
        padding: 0.4rem 0.625rem;
        font-size: 0.775rem;
        line-height: 1.55;
    }

    /* Topbar brand text: hide portal subtitle on very small screens */
    .dp-topbar-title {
        display: none;
    }

    /* Badge text in table cells: allow wrap */
    .dp-badge-danger-sm,
    .dp-badge-secondary-sm,
    .dp-badge-optional-sm,
    .dp-badge-success-sm {
        white-space: normal;
        display: inline;
    }

    /* Section gap */
    :root {
        --dp-section-gap: 1.5rem;
    }

    /* Example blocks: tighter padding */
    .dp-example-block > .row {
        padding: 0.375rem;
    }
    .dp-example-label {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    /* Callout */
    .dp-callout {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
        gap: 0.375rem;
    }
    .dp-callout-dark {
        padding: 0.75rem 0.875rem;
    }
    .dp-formula {
        font-size: 0.75rem;
    }

    /* Steps: tighter */
    .dp-steps li {
        gap: 0.625rem;
        padding: 0.5rem 0;
    }
}

/* ============================================================
   RESPONSIVE — Very small phones : < 400px
   ============================================================ */
@media (max-width: 399.98px) {
    .dp-content-inner {
        padding: 1rem 0.75rem 1.5rem;
    }

    .dp-page-title {
        font-size: 1.25rem;
    }
    .dp-section-title {
        font-size: 1rem;
    }

    .dp-code-block code {
        font-size: 0.65rem;
    }

    /* Offcanvas: nearly full-screen on tiny phones */
    .dp-offcanvas {
        width: 92vw !important;
        max-width: 92vw !important;
    }

    .dp-endpoint-badge {
        padding: 0.5rem 0.75rem;
    }
    .dp-endpoint-url {
        font-size: 0.75rem;
    }
}
