/* ===== DCpay Developer Final Redesign ===== */

:root {
    --dev-blue: #176fec;
    --dev-blue-2: #2f86f6;
    --dev-dark: #071f49;
    --dev-text: #294669;
    --dev-muted: #617b9e;
    --dev-line: rgba(31,122,236,.14);
    --dev-card: rgba(255,255,255,.90);
}

body.dcpay-dev-redesigned {
    background:
        linear-gradient(rgba(43,128,235,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43,128,235,.04) 1px, transparent 1px),
        linear-gradient(135deg,#f8fbff 0%,#f1f8ff 45%,#e7f2ff 100%) !important;
    background-size: 42px 42px, 42px 42px, auto !important;
}

.dcpay-dev-redesigned .dc-dev-lang {
    height: 44px;
    min-width: 150px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(31,122,236,.18);
    background: #fff;
    color: #0b3674;
    font-weight: 800;
    outline: none;
}

/* Logic flow card */
.dc-flow-card[data-dev-flow="new"] {
    max-width: 1120px !important;
    margin: 36px auto 34px !important;
    padding: 34px !important;
    border-radius: 26px !important;
    background: rgba(255,255,255,.92) !important;
    border: 1px solid rgba(31,122,236,.16) !important;
    box-shadow: 0 28px 80px rgba(23,82,150,.08) !important;
    overflow: hidden !important;
}

.dc-flow-inner {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr 1.1fr 1fr !important;
    gap: 34px !important;
    align-items: center !important;
    min-height: 430px !important;
}

.dc-flow-left,
.dc-flow-right {
    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;
}

.dc-flow-node {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    min-height: 78px !important;
    padding: 16px 18px !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,.96) !important;
    border: 1px solid rgba(31,122,236,.18) !important;
    box-shadow: 0 14px 34px rgba(23,82,150,.055) !important;
}

.dc-flow-icon {
    flex: 0 0 50px !important;
    width: 50px !important;
    height: 50px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 13px !important;
    color: #fff !important;
    background: linear-gradient(135deg,#2f86f6,#0f5ed5) !important;
    font-size: 22px !important;
    font-weight: 900 !important;
}

.dc-flow-icon.green {
    background: linear-gradient(135deg,#9de7cc,#58c49d) !important;
}

.dc-flow-node h3 {
    margin: 0 0 4px !important;
    color: #071f49 !important;
    font-size: 15.5px !important;
    line-height: 1.25 !important;
    font-weight: 900 !important;
}

.dc-flow-node p {
    margin: 0 !important;
    color: #617b9e !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
}

.dc-flow-center {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    min-height: 430px !important;
}

.dc-flow-gateway {
    width: 250px !important;
    min-height: 230px !important;
    padding: 26px 24px !important;
    border-radius: 22px !important;
    background: #fff !important;
    border: 1px solid rgba(31,122,236,.20) !important;
    box-shadow: 0 26px 70px rgba(23,82,150,.10) !important;
    text-align: center !important;
    z-index: 5 !important;
}

.dc-gateway-logo {
    width: 68px !important;
    height: 68px !important;
    margin: 0 auto 14px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg,#2f86f6,#0f5ed5) !important;
    display: grid !important;
    place-items: center !important;
    color: #fff !important;
    font-size: 32px !important;
    font-weight: 900 !important;
}

.dc-flow-gateway h2 {
    margin: 0 0 13px !important;
    color: #071f49 !important;
    font-size: 21px !important;
    line-height: 1.22 !important;
    font-weight: 900 !important;
}

.dc-flow-gateway ul {
    display: grid !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    color: #294669 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    text-align: left !important;
}

.dc-flow-gateway li::before {
    content: "✓";
    color: #176fec;
    margin-right: 7px;
}

.dc-flow-divider {
    position: absolute;
    border-color: rgba(23,111,236,.55);
    border-style: dashed;
    z-index: 1;
}

.dc-flow-step {
    position: absolute;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #176fec;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    z-index: 6;
}

.dc-flow-label {
    position: absolute;
    color: #294669;
    font-size: 12px;
    font-weight: 800;
    z-index: 4;
}

/* Footer matches homepage style */
.dc-dev-footer {
    margin-top: 42px !important;
    padding: 46px 42px 24px !important;
    border-top: 1px solid rgba(31,122,236,.12) !important;
    background:
        linear-gradient(rgba(255,255,255,.82), rgba(255,255,255,.82)),
        repeating-linear-gradient(135deg, rgba(0,0,0,.035) 0, rgba(0,0,0,.035) 16px, transparent 16px, transparent 70px) !important;
}

.dc-footer-grid {
    max-width: 1560px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: 1.25fr .9fr .9fr 1.15fr !important;
    gap: 38px !important;
}

.dc-footer-brand img {
    max-width: 160px;
    height: auto;
    margin-bottom: 20px;
}

.dc-footer-brand p {
    color: #40444f;
    font-size: 16px;
    line-height: 1.6;
    max-width: 470px;
}

.dc-footer-contact {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(0,0,0,.12);
    display: grid;
    gap: 10px;
    color: #444;
    font-weight: 600;
}

.dc-footer-social {
    display: flex;
    gap: 26px;
    margin-top: 26px;
    color: #444;
    font-weight: 900;
}

.dc-footer-col h4 {
    margin: 0 0 22px;
    color: #111;
    font-size: 22px;
    font-weight: 900;
}

.dc-footer-col a {
    display: block;
    margin-bottom: 14px;
    color: #474747;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.dc-footer-app img {
    display: block;
    width: 190px;
    max-width: 100%;
    margin-bottom: 18px;
}

.dc-footer-newsletter p {
    color: #474747;
    font-size: 17px;
    line-height: 1.6;
    max-width: 560px;
}

.dc-footer-input {
    display: flex;
    align-items: center;
    height: 52px;
    margin-bottom: 16px;
    border: 1px solid rgba(36,0,80,.18);
    border-radius: 5px;
    background: rgba(255,255,255,.62);
    padding: 0 16px;
}

.dc-footer-input input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    color: #333;
}

.dc-footer-subscribe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 30px;
    border-radius: 12px;
    background: #25014d;
    color: #fff;
    font-weight: 900;
    text-decoration: none;
}

.dc-footer-bottom {
    max-width: 1560px !important;
    margin: 34px auto 0 !important;
    padding-top: 22px !important;
    border-top: 1px solid rgba(0,0,0,.10) !important;
    color: #617b9e !important;
    font-size: 13px !important;
    display: flex !important;
    justify-content: space-between !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

@media (max-width: 1200px) {
    .dc-flow-inner {
        grid-template-columns: 1fr !important;
    }

    .dc-flow-center {
        min-height: auto !important;
    }

    .dc-footer-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 768px) {
    .dc-flow-card {
        padding: 20px !important;
    }

    .dc-dev-footer {
        padding: 36px 22px 24px !important;
    }

    .dc-footer-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== Developer footer scope fix: prevent API doc sidebar covering footer ===== */

/* Desktop: footer should start after the left documentation sidebar */
body.dcpay-dev-redesigned .dc-dev-footer {
    position: relative !important;
    z-index: 2 !important;
    margin-left: 320px !important;
    width: calc(100% - 320px) !important;
    box-sizing: border-box !important;
    clear: both !important;
}

/* Keep footer content aligned inside its own available area */
body.dcpay-dev-redesigned .dc-dev-footer .dc-footer-grid,
body.dcpay-dev-redesigned .dc-dev-footer .dc-footer-bottom {
    max-width: 1320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Make sure the old documentation sidebar does not visually cover footer */
body.dcpay-dev-redesigned .dc-dev-footer,
body.dcpay-dev-redesigned .dc-dev-footer * {
    pointer-events: auto !important;
}

/* Tablet/mobile: no left offset */
@media (max-width: 1200px) {
    body.dcpay-dev-redesigned .dc-dev-footer {
        margin-left: 0 !important;
        width: 100% !important;
    }
}


/* ===== Developer topbar inline layout fix ===== */

.dc-dev-topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    width: 100% !important;
}

.dc-dev-actions,
.dc-dev-support-lang-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 18px !important;
    flex-wrap: nowrap !important;
    width: auto !important;
}

.dc-dev-actions > *,
.dc-dev-support-lang-row > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.dc-dev-support-link {
    display: inline-flex !important;
    align-items: center !important;
    height: 48px !important;
    white-space: nowrap !important;
    color: #071f49 !important;
    font-weight: 900 !important;
    text-decoration: none !important;
}

.dc-dev-lang {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    min-width: 170px !important;
    max-width: 220px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 18px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(31,122,236,.18) !important;
    background: #fff !important;
    color: #0b3674 !important;
    font-weight: 800 !important;
    outline: none !important;
}

.dc-dev-login {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    min-width: 190px !important;
    margin: 0 !important;
    padding: 0 22px !important;
    border-radius: 13px !important;
    background: #25014d !important;
    color: #fff !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

/* Mobile: allow wrapping only on small screens */
@media (max-width: 768px) {
    .dc-dev-topbar {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .dc-dev-support-lang-row {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    .dc-dev-lang,
    .dc-dev-login {
        min-width: 160px !important;
    }
}
