﻿/* === SINGLE-SCROLL LAYOUT: header + footer fixed, MAIN scrolls === */
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden; /* page itself doesn't scroll */
}

.mk-shell {
    height: 100vh; /* fill viewport */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* prevent double scrollbars */
}

.mk-appbar {
    flex: 0 0 auto; /* don't stretch */
    position: sticky; /* stays at top if content bounces */
    top: 0;
    z-index: 1000;
}

.mk-body {
    flex: 1 1 auto; /* take remaining height */
    min-height: 0; /* CRITICAL: allow child to shrink + scroll */
    overflow-y: auto; /* the only scrollable area */
    -webkit-overflow-scrolling: touch; /* smooth on iOS */
    overscroll-behavior: contain; /* nicer scroll chaining */
}

.mk-footer {
    flex: 0 0 auto; /* fixed at bottom of shell */
    /* optional: sticky footer shadow */
    /* box-shadow: 0 -4px 12px rgba(0,0,0,.05); */
}

/* If any child tries to clamp height, relax it inside the scrolling area */
.mk-body > * {
    min-height: 0;
}

/* Defensive: components that sometimes set fixed heights/overflow */
.e-accordion, .e-accordion .e-content,
.e-carousel, .e-carousel .e-content {
    max-height: none !important;
    overflow: visible;
}

/* Ensure accordions/carousels don't clamp their content */
.mk-accordion, .mk-acc-row {
    overflow: visible;
}

.mk-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.mk-appbar {
    position: sticky;
    top: 0;
    z-index: 1000
}

.mk-brand {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 600
}

    .mk-brand img {
        height: 24px
    }

.mk-nav a {
    margin: 0 10px;
    color: white;
    text-decoration: none
}


.mk-footer {
    border-top: 1px solid #e5e7eb;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap
}

    .mk-footer a {
        color: inherit;
        text-decoration: none;
        margin-left: 12px
    }

.mk-hero {
    padding: 70px 16px;
    background: linear-gradient(180deg,#eef2ff,white)
}

.mk-hero-inner {
    max-width: 1080px;
    margin: 0 auto;
    text-align: center
}

.mk-hero h1 {
    font-size: 40px;
    line-height: 1.1;
    margin: 0 0 10px
}

.mk-sub {
    font-size: 18px;
    color: #374151;
    margin: 0 auto 16px;
    max-width: 820px
}

.mk-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px
}

.mk-hero-tags {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap
}

.mk-pill {
    background: #eef2ff;
    border: 1px solid #dbeafe;
    border-radius: 9999px;
    padding: 4px 10px;
    font-size: .85rem;
    color: #1e3a8a
}

.mk-logos {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
    opacity: .8;
    padding: 20px 0
}

.mk-grid {
    max-width: 1080px;
    margin: 24px auto;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 12px;
    padding: 0 16px
}

@media (max-width:1024px) {
    .mk-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }
}

@media (max-width:640px) {
    .mk-grid {
        grid-template-columns: 1fr
    }
}

.mk-carousel {
    max-width: 980px;
    margin: 24px auto;
    padding: 0 16px
}

.mk-cta2 {
    padding: 40px 16px;
    text-align: center
}

    .mk-cta2 h2 {
        margin-bottom: 10px
    }

.mk-head {
    max-width: 840px;
    margin: 34px auto 16px;
    padding: 0 16px;
    text-align: center
}

.mk-list {
    margin: 8px 0 0 16px
}

.mk-pricing {
    max-width: 1080px;
    margin: 12px auto;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 16px;
    padding: 0 16px
}

@media (max-width:940px) {
    .mk-pricing {
        grid-template-columns: 1fr
    }
}

.mk-plan {
    border: 1px solid #eef2ff;
    border-radius: 12px
}

    .mk-plan.mk-featured {
        box-shadow: 0 8px 24px rgba(0,0,0,.08)
    }

.mk-price {
    font-size: 28px;
    font-weight: 800;
    margin: 8px 0
}

.mk-form {
    max-width: 760px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 0 16px
}

    .mk-form .span2 {
        grid-column: 1 / -1
    }

    .mk-form label {
        font-weight: 400;
        margin-bottom: 4px;
        display: block
    }

    /* Accordion layout helpers */
    .mk-accordion {
        max-width: 1080px;
        margin: 24px auto;
        padding: clamp(32px, 5vw, 64px) 16px;
    }

    .mk-acc-title {
        margin: 0 0 12px;
        font-size: clamp(20px, 2.6vw, 28px);
        line-height: 1.2;
    }

    .mk-acc-row {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        gap: clamp(16px, 3vw, 32px);
        align-items: center;
    }

    .mk-acc-text p {
        margin: 0 0 10px;
        color: #475569;
    }

    .mk-acc-text ul {
        margin: 8px 0 0;
        padding-left: 1.1rem;
    }

    .mk-acc-text li {
        margin: 6px 0;
        color: #475569;
    }

    .mk-acc-media {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        background: #f8fafc;
        box-shadow: 0 8px 24px rgba(0,0,0,.06);
    }

    .mk-acc-list {
        margin: 0;
        padding-left: 1.1rem;
    }

        .mk-acc-list li {
            margin: 6px 0;
            color: #475569;
        }

    @media (max-width: 992px) {
        .mk-acc-row {
            grid-template-columns: 1fr;
        }
    }

/* Screenshots section */
.mk-screens {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 64px) 16px;
}

    .mk-screens h2 {
        margin: 0 0 6px;
        font-size: clamp(22px, 3vw, 30px);
        line-height: 1.2;
    }

.mk-screens-sub {
    color: #475569;
    margin: 0 0 16px;
}

/* Carousel frame */
.mk-screens .e-carousel {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    background: #fff;
    overflow: hidden; /* clip rounded corners */
}

    /* Carousel images */
    .mk-screens .e-carousel img {
        display: block;
        width: 100%;
        height: auto;
    }

/* Thumbnails grid */
.mk-screens-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

    .mk-screens-grid img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        background: #f8fafc;
    }

@media (max-width: 1024px) {
    .mk-screens-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .mk-screens-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Ensure only MAIN scrolls (keeps AppBar/Footer fixed) */
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.mk-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mk-appbar {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mk-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mk-footer {
    flex: 0 0 auto;
}

.mk-nav a.mk-active {
    text-decoration: underline;
    text-underline-offset: 6px;
    font-weight: 400;
}

/* Primary button base */
.e-btn.e-primary {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #ffffff !important;
}

    /* Hover */
    .e-btn.e-primary:hover {
        background: #1e293b !important;
        border-color: #1e293b !important;
        color: #ffffff !important;
    }

    /* Focus (keyboard + click) */
    .e-btn.e-primary:focus,
    .e-btn.e-primary:focus-visible {
        background: #1e293b !important;
        border-color: #1e293b !important;
        box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.25) !important;
        color: #ffffff !important;
    }

    /* Active (pressed) */
    .e-btn.e-primary:active {
        background: #020617 !important;
        border-color: #020617 !important;
        color: #ffffff !important;
    }

    /* Disabled */
    .e-btn.e-primary:disabled,
    .e-btn.e-primary.e-disabled {
        background: #cbd5e1 !important;
        border-color: #cbd5e1 !important;
        color: #64748b !important;
        cursor: not-allowed;
    }

/* Partner API docs */
.partner-docs-layout {
    min-height: 100vh;
    background: #f8fafc;
    color: #111827;
}

.pd-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.pd-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 64px;
    padding: 0 28px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.pd-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
}

.pd-brand img {
    width: 30px;
    height: 30px;
}

.pd-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
}

.pd-nav a,
.pd-sidebar a {
    color: #475569;
    text-decoration: none;
}

.pd-nav a:hover,
.pd-sidebar a:hover {
    color: #0f172a;
}

.pd-main {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
}

.pd-sidebar {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    padding: 28px 24px;
    border-right: 1px solid #e5e7eb;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.pd-content {
    width: min(1120px, 100%);
    padding: 44px 40px 80px;
}

.pd-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    gap: 32px;
    align-items: center;
    padding-bottom: 38px;
    border-bottom: 1px solid #e5e7eb;
}

.pd-eyebrow {
    margin: 0 0 10px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.pd-hero h1 {
    margin: 0;
    max-width: 760px;
    color: #0f172a;
    font-size: 46px;
    line-height: 1.08;
    letter-spacing: 0;
}

.pd-lead {
    max-width: 760px;
    margin: 16px 0 0;
    color: #475569;
    font-size: 18px;
    line-height: 1.6;
}

.pd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.pd-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
}

.pd-button:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.pd-button-primary {
    border-color: #0f172a;
    background: #0f172a;
    color: #ffffff;
}

.pd-button-primary:hover {
    background: #1e293b;
    color: #ffffff;
}

.pd-terminal,
.pd-endpoint pre {
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #1e293b;
    background: #0f172a;
    color: #dbeafe;
}

.pd-terminal-bar {
    display: flex;
    gap: 6px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.pd-terminal-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #64748b;
}

.pd-terminal pre,
.pd-endpoint pre {
    margin: 0;
    padding: 18px;
    overflow-x: auto;
    white-space: pre;
}

.pd-terminal code,
.pd-endpoint code {
    font-size: 13px;
}

.pd-section {
    padding: 38px 0;
    border-bottom: 1px solid #e5e7eb;
}

.pd-section h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: 0;
}

.pd-section p {
    max-width: 820px;
    color: #475569;
    line-height: 1.65;
}

.pd-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.pd-card,
.pd-endpoint {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.pd-card {
    padding: 18px;
}

.pd-card h3,
.pd-endpoint h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 17px;
    letter-spacing: 0;
}

.pd-card p,
.pd-endpoint p {
    margin: 0;
    font-size: 14px;
}

.pd-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.pd-table-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.pd-table-wrap th,
.pd-table-wrap td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.pd-table-wrap th {
    color: #334155;
    font-size: 13px;
    text-transform: uppercase;
}

.pd-table-wrap td {
    color: #475569;
}

.pd-table-wrap tr:last-child td {
    border-bottom: none;
}

.pd-endpoints {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}

.pd-endpoint {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
}

.pd-method {
    align-self: start;
    justify-self: start;
    min-width: 58px;
    padding: 5px 8px;
    border-radius: 6px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.pd-steps {
    margin: 0 0 20px;
    padding-left: 22px;
    color: #475569;
    line-height: 1.8;
}

.pd-content code {
    border-radius: 5px;
    background: #e2e8f0;
    color: #0f172a;
    padding: 2px 5px;
}

.pd-terminal code,
.pd-endpoint pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

@media (max-width: 980px) {
    .pd-main {
        grid-template-columns: 1fr;
    }

    .pd-sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .pd-content {
        padding: 32px 20px 64px;
    }

    .pd-hero,
    .pd-grid {
        grid-template-columns: 1fr;
    }

    .pd-hero h1 {
        font-size: 36px;
    }
}

@media (max-width: 680px) {
    .pd-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 18px;
    }

    .pd-nav {
        flex-wrap: wrap;
        gap: 10px 14px;
    }

    .pd-endpoint {
        grid-template-columns: 1fr;
    }
}
