/*
 * Super Loans customer portal chrome
 * v2.20.6
 *
 * The WordPress/Divi primary header is intentionally removed for logged-in
 * customers. The portal owns its own navigation and branding.
 */

/* ---------- Remove theme header + hamburger + reserved top space ---------- */
body.super-loans-customer-portal .site-header,
body.super-loans-customer-portal #main-header,
body.super-loans-customer-portal .et-l--header,
body.super-loans-customer-portal .et_pb_menu,
body.super-loans-customer-portal .et_pb_fullwidth_menu,
body.super-loans-customer-portal .et_pb_menu__menu,
body.super-loans-customer-portal .et_pb_menu__mobile_menu,
body.super-loans-customer-portal .et_mobile_nav_menu,
body.super-loans-customer-portal .mobile_nav,
body.super-loans-customer-portal .mobile_menu_bar,
body.super-loans-customer-portal .et_toggle_slide_menu,
body.super-loans-customer-portal .et_pb_menu__toggle,
body.super-loans-customer-portal .et_pb_section.et_pb_section_0_tb_header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

html body.super-loans-customer-portal,
body.super-loans-customer-portal #page-container,
body.super-loans-customer-portal #et-main-area,
body.super-loans-customer-portal .et-l--body,
body.super-loans-customer-portal .site-content,
body.super-loans-customer-portal #main-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    top: auto !important;
}

html body.super-loans-customer-portal {
    overflow-x: hidden !important;
}

body.super-loans-customer-portal * {
    box-sizing: border-box;
}

/* ---------- Keep portal branding visible ---------- */
body.super-loans-customer-portal .slp-bank-brand,
body.super-loans-customer-portal .slp-mobile-brand,
body.super-loans-customer-portal .slp-profile-brand,
body.super-loans-customer-portal .slp-auth-logo-wrap,
body.super-loans-customer-portal .slp-reset-logo-wrap {
    visibility: visible !important;
    opacity: 1 !important;
}

.slp-bank-brand img,
.slp-mobile-brand img,
.slp-profile-brand img,
.slp-auth-logo,
.slp-reset-logo {
    max-width: 100%;
    height: auto;
}

/* ---------- All customer pages ---------- */
body.super-loans-customer-portal .slp-container,
body.super-loans-customer-portal .slp-container.slp-feature-page,
body.super-loans-customer-portal .slp-container:not(.slp-auth-shell) {
    width: 100%;
    max-width: 1180px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: clamp(12px, 2vw, 24px) !important;
    padding-right: clamp(12px, 2vw, 24px) !important;
}

/* Prevent long wallet/hash values from breaking the viewport. */
body.super-loans-customer-portal input,
body.super-loans-customer-portal select,
body.super-loans-customer-portal textarea,
body.super-loans-customer-portal button {
    max-width: 100%;
}

body.super-loans-customer-portal input,
body.super-loans-customer-portal select,
body.super-loans-customer-portal textarea {
    min-width: 0;
}

body.super-loans-customer-portal table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.super-loans-customer-portal th,
body.super-loans-customer-portal td {
    white-space: nowrap;
}

/* ---------- Dashboard ---------- */
body.super-loans-customer-portal .slp-bank-dashboard {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    margin-top: 0 !important;
}

body.super-loans-customer-portal .slp-bank-main {
    min-width: 0;
}

body.super-loans-customer-portal .slp-bank-topbar {
    margin-top: 0 !important;
}

/* ---------- Responsive dashboard ---------- */
@media (max-width: 1100px) {
    body.super-loans-customer-portal .slp-bank-dashboard {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    body.super-loans-customer-portal .slp-bank-main {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 820px) {
    body.super-loans-customer-portal .slp-bank-dashboard {
        display: block;
        width: 100vw;
        max-width: 100vw;
        margin: 0 calc(50% - 50vw) !important;
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    body.super-loans-customer-portal .slp-bank-sidebar {
        display: none !important;
    }

    body.super-loans-customer-portal .slp-bank-main {
        width: 100%;
        padding: 0 12px 18px !important;
    }

    body.super-loans-customer-portal .slp-bank-topbar {
        min-height: 64px;
        padding: 8px 0;
    }

    body.super-loans-customer-portal .slp-mobile-brand {
        display: block;
        flex: 0 1 auto;
        min-width: 0;
    }

    body.super-loans-customer-portal .slp-mobile-brand img {
        width: clamp(105px, 31vw, 132px);
    }

    body.super-loans-customer-portal .slp-bank-top-actions {
        margin-left: auto;
        flex: 0 0 auto;
    }

    body.super-loans-customer-portal .slp-hero-banner {
        width: 100%;
        min-height: 0;
        padding: clamp(22px, 5vw, 30px);
    }

    body.super-loans-customer-portal .slp-hero-copy {
        width: 100%;
        max-width: 100%;
    }

    body.super-loans-customer-portal .slp-hero-copy h2 {
        font-size: clamp(21px, 5.5vw, 28px);
        overflow-wrap: anywhere;
    }

    body.super-loans-customer-portal .slp-hero-copy p {
        max-width: 100%;
    }

    body.super-loans-customer-portal .slp-hero-orbit {
        right: -90px;
        bottom: -90px;
        pointer-events: none;
    }

    body.super-loans-customer-portal .slp-bank-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.super-loans-customer-portal .slp-bank-content-grid {
        display: flex;
        flex-direction: column;
    }

    body.super-loans-customer-portal .slp-bank-content-side {
        order: -1;
    }

    body.super-loans-customer-portal .slp-mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(64px + env(safe-area-inset-bottom));
    }

    body.super-loans-customer-portal .slp-mobile-bottom-nav a {
        min-width: 0;
    }
}

@media (max-width: 520px) {
    body.super-loans-customer-portal .slp-bank-main {
        padding-left: 9px !important;
        padding-right: 9px !important;
    }

    body.super-loans-customer-portal .slp-bank-topbar {
        min-height: 58px;
    }

    body.super-loans-customer-portal .slp-mobile-brand img {
        width: 112px;
    }

    body.super-loans-customer-portal .slp-bank-top-actions {
        gap: 7px;
    }

    body.super-loans-customer-portal .slp-bell {
        width: 36px;
        height: 36px;
    }

    body.super-loans-customer-portal .slp-top-avatar {
        width: 34px;
        height: 34px;
    }

    body.super-loans-customer-portal .slp-hero-banner {
        border-radius: 14px;
        padding: 20px 17px;
    }

    body.super-loans-customer-portal .slp-bank-primary-btn {
        width: 100%;
    }

    body.super-loans-customer-portal .slp-bank-stat {
        min-width: 0;
        padding: 10px;
    }

    body.super-loans-customer-portal .slp-bank-stat strong {
        font-size: 13px;
    }

    body.super-loans-customer-portal .slp-bank-panel {
        padding: 14px;
        border-radius: 13px;
    }

    body.super-loans-customer-portal .slp-bank-panel-head {
        gap: 8px;
    }

    body.super-loans-customer-portal .slp-bank-panel-head h3 {
        font-size: 14px;
    }

    body.super-loans-customer-portal .slp-page-nav {
        position: relative;
        top: auto;
        margin-left: -9px;
        margin-right: -9px;
        min-height: 60px;
        padding: 10px 12px;
    }

    body.super-loans-customer-portal .slp-page-nav h1 {
        font-size: 17px;
    }

    body.super-loans-customer-portal .slp-feature-page-main,
    body.super-loans-customer-portal .slp-feature-side-card,
    body.super-loans-customer-portal .slp-destination-card {
        width: 100%;
        min-width: 0;
    }
}

/* Back-to-dashboard controls stay inside the page content, not the theme header. */
.slp-back-dashboard.slp-bottom-dashboard-link {
    margin-top: 20px !important;
    margin-bottom: 0 !important;
}

/* v2.20.4 profile item */
.slp-mobile-nav a[href*="/profile/"] {
    display: flex !important;
    visibility: visible !important;
}


/* v2.22.0 */
.slp-theme-switch:disabled { opacity: .65; cursor: wait; }
.slp-profile-dashboard-back { margin-left: auto; }
@media (max-width: 760px) {
  .slp-bank-topbar { flex-wrap: wrap; }
  .slp-profile-dashboard-back { margin-left: 0; width: 100%; text-align: center; }
}
