/* ========================================= */
/* 1️⃣ CHANGE SUPPORTERS TITLE */
/* ========================================= */

/* Hide original heading text */
h5.text-center.fw-normal.mb-4 {
    font-size: 0 !important;
    position: relative;
}

/* Insert your custom title */
h5.text-center.fw-normal.mb-4::after {
    content: "";
    font-size: 22px;
    font-weight: 500;
    position: absolute;
    left: 0;
    right: 0;
}


/* ========================================= */
/* 2️⃣ REMOVE VIEW ALL SUPPORTERS / DONATE */
/* ========================================= */

a[href*="foundation.btcpayserver.org"],
a[href*="btcpayserver.org/donate"],
p.text-center span {
    display: none !important;
}

/* If paragraph becomes empty, hide it */
footer p.text-center:empty {
    display: none !important;
}



/* ===================================================== */
/* 3️⃣ REMOVE SOCIAL LINKS BELOW */
/* ===================================================== */

footer a,
footer .social,
footer .social-links {
    display: none !important;
}


/* ===================================================== */
/* 4️⃣ ADD YOUR COPYRIGHT */
/* ===================================================== */

footer::after {
    content: "© M5DexPay 2026. All Rights Reserved.";
    display: block;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    color: #888;
}


/* ============================================================
   M5DEX PAY — BTCPay Server v2.4.x
   LOGIN / PUBLIC PAGE CLEANUP
   Use with: "Extends the BTCPay Server Light theme"
   ============================================================ */

/*
 * Remove BTCPay public-page extras:
 * - Contact Us
 * - BTCPay Server Supporters heading
 * - supporter/sponsor logos and names
 * - "or" separator associated with supporters/donation area
 * - Twitter / Telegram / API / Docs footer links
 *
 * Keep M5DEX Pay copyright added below.
 */

/* Supporters / sponsors section */
#Supporters,
#supporters,
.supporters,
.supporters-list,
.supporters-container,
.btcpay-supporters,
.btcpayserver-supporters,
[class*="supporter"],
[id*="supporter"] {
    display: none !important;
}

/* Public login/register page footer and project links */
body:not(.authenticated) footer,
.account-page footer,
.login-page footer {
    font-size: 0 !important;
}

/* Hide all original footer children/links on public auth pages */
body:not(.authenticated) footer > *,
.account-page footer > *,
.login-page footer > * {
    display: none !important;
}

/* Rebuild only the M5DEX Pay copyright */
body:not(.authenticated) footer::after,
.account-page footer::after,
.login-page footer::after {
    content: "© M5DEX Pay 2026. All Rights Reserved.";
    display: block !important;
    text-align: center;
    padding: 18px 12px;
    font-size: 14px !important;
    line-height: 1.4;
    color: #6c757d;
}

/*
 * BTCPay auth layout currently exposes some public links outside footer.
 * Hide known external BTCPay/support project destinations.
 */
a[href*="foundation.btcpayserver.org"],
a[href*="btcpayserver.org/donate"],
a[href*="twitter.com/btcpayserver"],
a[href*="x.com/btcpayserver"],
a[href*="t.me/btcpayserver"],
a[href*="telegram"],
a[href*="docs.btcpayserver.org"],
a[href*="github.com/btcpayserver"],
a[href*="opensats.org"],
a[href*="spiral.xyz"],
a[href*="tether.to"],
a[href*="hrf.org"] {
    display: none !important;
}

/* Hide empty containers left behind after links are removed */
footer p:empty,
footer div:empty,
footer nav:empty,
footer ul:empty {
    display: none !important;
}


/* ============================================================
   M5DEX PAY — BTCPay Server v2.4.4
   FINAL TARGETED LOGIN/PUBLIC PAGE CLEANUP
   ============================================================ */

/* Exact v2.4.4 Contact Us link */
#ContactLink {
    display: none !important;
}

/* Remove the Contact Us paragraph itself, including its negative/positive spacing */
p.text-center.mt-n5.mb-5.pt-2:has(> #ContactLink) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

/* Exact supporters row immediately following the Contact Us paragraph */
p.text-center.mt-n5.mb-5.pt-2:has(> #ContactLink)
+ .row.justify-content-center.mt-5 {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

/* Additional fallback: remove supporter content if BTCPay slightly changes wrapper classes */
h5.text-center.fw-normal.mb-4 {
    display: none !important;
}

a[href="https://spiral.xyz"],
a[href="https://opensats.org"],
a[href="https://tether.to"],
a[href="https://hrf.org"],
a[href="https://foundation.btcpayserver.org"],
a[href="https://btcpayserver.org/donate/"] {
    display: none !important;
}

/* Preserve only M5DEX Pay copyright generated by the theme */
footer::after {
    content: "© M5DEX Pay 2026. All Rights Reserved.";
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    line-height: 1.4;
    color: #6c757d;
}


/* ============================================================
   M5DEX PAY — BTCPay Server v2.4.4
   V2 LOGIN-ONLY HEIGHT / FOOTER CORRECTION
   ============================================================ */

/*
   BTCPay v2.4.4 renders:
     body.d-flex.flex-column.min-vh-100
       > section.content-wrapper.flex-grow-1
       > footer.btcpay-footer

   Scope this correction ONLY to pages containing #login-form.
   This prevents the login content wrapper from consuming all
   remaining viewport height and pushing the footer to the bottom.
*/
body:has(#login-form) > .content-wrapper.flex-grow-1 {
    flex-grow: 0 !important;
}

/* Keep the footer/copyright naturally below the login content. */
body:has(#login-form) > .content-wrapper + .btcpay-footer {
    margin-top: 1.5rem !important;
    padding-top: 0 !important;
}
