/* Lesaka brand – same palette as CustomerPortal.Admin (lesaka-admin.css) */
:root {
    --lesaka-lime: #c5e600;
    --lesaka-lime-dark: #b3d100;
    --lesaka-earth: #3a2b28;
    --lesaka-earth-deep: #2f231f;
    --lesaka-body-bg: #f0f2f5;
    --lesaka-text: #2b2b2b;
    --lesaka-text-muted: #6c757d;
    --lesaka-highlight-bg: #f4fadc;
    /* Legacy aliases used in portal CSS */
    --main-bg-color: var(--lesaka-highlight-bg);
    --reddish-color: var(--lesaka-earth);
}

body {
    background-color: var(--lesaka-body-bg);
    color: var(--lesaka-text);
}

header.header {
    background-color: var(--lesaka-lime);
    background-image: linear-gradient(
        102deg,
        var(--lesaka-lime) 0%,
        var(--lesaka-lime) 52%,
        #a8c400 58%,
        #6b5a4a 68%,
        var(--lesaka-earth) 82%,
        var(--lesaka-earth-deep) 100%
    );
    border-bottom: 2px solid var(--lesaka-earth);
}

header.header .navbar {
    background: transparent !important;
}

/* Mobile menu (☰) – visible on lime and dark header gradient */
header.header .navbar-toggler {
    border: 2px solid var(--lesaka-earth);
    background-color: #ffffff;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

header.header .navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(197, 230, 0, 0.55);
}

header.header .navbar-toggler .navbar-toggler-icon {
    width: 1.35rem;
    height: 1.35rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='%233a2b28' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

header.header .admin-header-notification {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--lesaka-lime) !important;
    text-decoration: none;
}

header.header .admin-header-notification:hover,
header.header .admin-header-notification:focus {
    color: #ffffff !important;
    text-decoration: none;
}

header.header .admin-header-notification-icon {
    font-size: 1.75rem;
    color: inherit;
}

header.header .admin-header-notification .count {
    top: -8px;
    right: -10px;
}

/* Customer portal menu (_CustomerMenu.cshtml) */
header.header .customer-nav .nav-link,
header.header .customer-nav .nav-link .gray {
    color: #ffffff !important;
    font-weight: 600;
}

header.header .customer-nav .nav-link:hover,
header.header .customer-nav .nav-link:focus,
header.header .customer-nav .nav-link:hover .gray {
    color: var(--lesaka-lime) !important;
    background-color: rgba(47, 35, 31, 0.35);
    border-radius: 6px;
}

header.header .customer-nav-account {
    align-items: center;
}

header.header .customer-header-account {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    margin: 0.25rem 0.5rem 0.25rem 0;
    border-radius: 8px;
    background: rgba(47, 35, 31, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 0.875rem;
    line-height: 1.3;
}

header.header .customer-header-account .fa-user {
    color: var(--lesaka-lime);
}

header.header .customer-header-account-label {
    font-weight: 600;
    text-transform: capitalize;
}

header.header .customer-header-account-value {
    color: var(--lesaka-lime);
    font-weight: 700;
}

header.header .navbar-collapse {
    background: transparent;
}

@media (max-width: 767.98px) {
    header.header .navbar-collapse {
        background: rgba(47, 35, 31, 0.92);
        border-radius: 8px;
        margin-top: 0.35rem;
        padding: 0.5rem;
    }

    header.header .customer-header-account {
        margin: 0.5rem 0;
        width: 100%;
        justify-content: center;
    }
}

/* Meter dashboard – search + actions (CustomerDashboard.cshtml) */
.meter-dashboard-toolbar-row {
    gap: 0.75rem;
}

.meter-dashboard-toolbar {
    flex: 1 1 280px;
    min-width: 0;
}

.meter-dashboard-search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.35rem;
}

.meter-dashboard-search-field {
    position: relative;
    flex: 1 1 160px;
    max-width: 320px;
    min-width: 0;
}

.meter-dashboard-search-input {
    width: 100%;
    height: 42px;
    padding-right: 2rem;
    border: 1px solid rgba(58, 43, 40, 0.25);
    border-radius: 6px;
}

.meter-dashboard-search-input:focus {
    border-color: var(--lesaka-earth);
    box-shadow: 0 0 0 3px rgba(197, 230, 0, 0.35);
}

.meter-dashboard-search-field .close-icon:after {
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
}

.meter-dashboard-search-input:not(:valid) ~ .meter-dashboard-search-clear {
    display: none;
}

.meter-dashboard-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.5rem 1rem;
    margin: 0;
    white-space: nowrap;
    border-radius: 6px;
    line-height: 1.2;
}

@media (max-width: 575.98px) {
    .meter-dashboard-search-form {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .meter-dashboard-search-field {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
    }

    .meter-dashboard-search-form > button.meter-dashboard-action-btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 5.25rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .meter-dashboard-search-form > a.meter-dashboard-action-btn {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* Admin dynamic menu (loaded into #ulUserAccessList) */
#ulUserAccessList .nav-link {
    border-radius: 6px;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

#ulUserAccessList .nav-link,
#ulUserAccessList .nav-link span,
#ulUserAccessList .nav-link .gray {
    color: #fff !important;
    font-weight: 700;
}

#ulUserAccessList .nav-link:hover,
#ulUserAccessList .nav-link:focus,
#ulUserAccessList .nav-link:hover span,
#ulUserAccessList .nav-link:hover .gray {
    color: #fff !important;
    background-color: rgba(47, 35, 31, 0.55);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

/* Bootstrap 4 primary → Lesaka earth */
.btn-primary,
.btn-primary.disabled,
.btn-primary:disabled {
    background-color: var(--lesaka-earth);
    border-color: var(--lesaka-earth-deep);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: var(--lesaka-earth-deep);
    border-color: var(--lesaka-earth-deep);
    color: var(--lesaka-lime);
}

.btn-outline-primary {
    color: var(--lesaka-earth);
    border-color: var(--lesaka-earth);
}

.btn-outline-primary:hover {
    background-color: var(--lesaka-lime);
    border-color: var(--lesaka-lime-dark);
    color: var(--lesaka-earth-deep);
}

/* BACK + primary action row (e.g. Add Your Meter) */
.btnsWidth.btnsWidth--pair {
    width: 100% !important;
    max-width: 28rem;
    gap: 0.75rem;
}

.btnsWidth.btnsWidth--pair .backBtn,
.btnsWidth.btnsWidth--pair .button,
.btnsWidth.btnsWidth--pair .btnsWidth-primary {
    width: auto;
    min-width: 9rem;
    flex: 1 1 0;
    margin: 0 !important;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.25;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.btnsWidth.btnsWidth--pair .backBtn {
    flex: 0 1 auto;
    max-width: 9rem;
}

.btnsWidth.btnsWidth--pair .btnsWidth-primary {
    flex: 1 1 auto;
    min-width: 10rem;
}

/* BACK + Next + Complete registration (3 actions) */
.btnsWidth.btnsWidth--multi {
    max-width: 48rem;
    width: 100% !important;
}

.btnsWidth.btnsWidth--multi .backBtn {
    flex: 0 1 auto;
    min-width: 5.5rem;
    max-width: none;
}

.btnsWidth.btnsWidth--multi .button {
    flex: 1 1 auto;
    min-width: 5.5rem;
    font-size: 0.875rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    white-space: normal;
}

.btnsWidth.btnsWidth--multi .aNextBtn {
    flex: 0 1 auto;
    min-width: 6rem;
    max-width: 8rem;
}

.btnsWidth.btnsWidth--multi .aCompleteBtn {
    flex: 1 1 12rem;
    min-width: 10rem;
}

@media (min-width: 1200px) {
    .btnsWidth.btnsWidth--pair {
        width: 100% !important;
        max-width: 28rem;
    }

    .btnsWidth.btnsWidth--multi {
        max-width: 48rem;
    }
}

@media (max-width: 575.98px) {
    .btnsWidth.btnsWidth--pair {
        max-width: none;
    }

    .btnsWidth.btnsWidth--pair .backBtn,
    .btnsWidth.btnsWidth--pair .btnsWidth-primary {
        flex: 1 1 calc(50% - 0.4rem);
        min-width: 0;
    }

    .btnsWidth.btnsWidth--multi .backBtn,
    .btnsWidth.btnsWidth--multi .aNextBtn {
        flex: 1 1 calc(50% - 0.4rem);
        min-width: 0;
        max-width: none;
    }

    .btnsWidth.btnsWidth--multi .aCompleteBtn {
        flex: 1 1 100%;
    }
}

.backBtn:hover,
.backBtn:focus {
    background-color: var(--lesaka-lime);
    color: var(--lesaka-earth-deep);
    text-decoration: none;
}

.meter-form-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.meter-form-add-btn,
.meter-form-actions .button {
    width: auto;
    min-width: 6.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Customer portal Lesaka earth buttons — lime hover, dark text (fixes white-on-white hover) */
.searchBtn:hover,
.searchBtn:focus,
.buttons:hover,
.buttons:focus,
.button:hover,
.button:focus,
.searchBtn1:hover,
.searchBtn1:focus,
.searchBtnLay:hover,
.searchBtnLay:focus,
.buttonLay:hover,
.buttonLay:focus,
a.searchBtn1:hover,
a.searchBtn1:focus {
    background-color: var(--lesaka-lime) !important;
    border: 1px solid var(--lesaka-earth-deep) !important;
    color: var(--lesaka-earth-deep) !important;
}

.btn.searchBtn:hover,
.btn.searchBtn:focus,
.btn.buttons:hover,
.btn.buttons:focus,
.btn.searchBtn1:hover,
.btn.searchBtn1:focus,
.btn.searchBtnLay:hover,
.btn.searchBtnLay:focus {
    background-color: var(--lesaka-lime) !important;
    border-color: var(--lesaka-earth-deep) !important;
    color: var(--lesaka-earth-deep) !important;
}

.bg-primary {
    background-color: var(--lesaka-earth) !important;
}

.text-primary {
    color: var(--lesaka-earth) !important;
}

.border-primary {
    border-color: var(--lesaka-earth) !important;
}

a.text-primary:hover,
a.text-primary:focus {
    color: var(--lesaka-earth-deep) !important;
}

.page-item.active .page-link {
    background-color: var(--lesaka-earth);
    border-color: var(--lesaka-earth-deep);
}

.page-link {
    color: var(--lesaka-earth);
}

.page-link:hover {
    color: var(--lesaka-earth-deep);
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--lesaka-earth);
    border-color: var(--lesaka-earth-deep);
}

/* Customer Services page (Services.cshtml) */
.customer-services-page {
    padding: 1.5rem 0 2rem;
    /*max-width: 1200px;*/
    max-width:100%;
    margin: 0 auto;
}

.customer-services-shell {
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(58, 43, 40, 0.1);
    box-shadow: 0 8px 32px rgba(47, 35, 31, 0.07);
}

.customer-services-tabs-wrap {
    padding: 1.25rem 1.25rem 0;
    background: linear-gradient(
        165deg,
        var(--lesaka-highlight-bg) 0%,
        #ffffff 55%
    );
    border-bottom: 1px solid rgba(58, 43, 40, 0.08);
}

.customer-services-lead {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--lesaka-text-muted);
}

.customer-services-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0 !important;
    padding-bottom: 1rem;
}

.customer-services-page .navPills .nav-item {
    width: auto;
    margin-left: 0 !important;
    margin-bottom: 0 !important;
}

.customer-services-tab.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid var(--lesaka-earth-deep);
    background-color: var(--lesaka-earth);
    color: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
        box-shadow 0.15s ease;
}

.customer-services-tab.nav-link:hover,
.customer-services-tab.nav-link:focus {
    background-color: var(--lesaka-earth-deep);
    color: var(--lesaka-lime);
    border-color: var(--lesaka-earth-deep);
    text-decoration: none;
}

.customer-services-tab.nav-link.active,
.customer-services-page .show > .customer-services-tab.nav-link {
    background-color: var(--lesaka-lime) !important;
    color: var(--lesaka-earth-deep) !important;
    border-color: var(--lesaka-earth-deep) !important;
    box-shadow: 0 2px 8px rgba(197, 230, 0, 0.45);
}

.customer-services-body {
    padding: 1.5rem 1.25rem 1.75rem;
}

/* Site footer – show legal links on mobile (fixed height was clipping them) */
.footer.lesaka-site-footer {
    height: auto;
    min-height: 60px;
    line-height: 1.35;
    padding: 0.65rem 1rem;
}

.lesaka-site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.lesaka-site-footer .copyright,
.lesaka-site-footer .assistanceCall {
    padding-left: 0;
    padding-right: 0;
}

.lesaka-site-footer__assistance {
    flex: 1 1 280px;
    font-size: 0.8125rem;
}

.lesaka-site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex: 0 1 auto;
}

.lesaka-site-footer__legal .searchBtnLay {
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .lesaka-site-footer__inner {
        justify-content: center;
        text-align: center;
    }

    .lesaka-site-footer__assistance {
        flex: 1 1 100%;
        text-align: center;
    }

    .lesaka-site-footer__legal {
        flex: 1 1 100%;
        justify-content: center;
    }

    .lesaka-site-footer__legal .searchBtnLay {
        flex: 1 1 calc(50% - 0.35rem);
        max-width: 12.5rem;
        min-width: 0;
    }

    .container-fluid.pb-5 {
        padding-bottom: 8.5rem !important;
    }
}

@media (min-width: 992px) {
    .lesaka-site-footer .copyright {
        padding-left: 5.8rem;
    }

    .lesaka-site-footer__assistance {
        text-align: right;
        padding-right: 1rem;
    }
}

@media (max-width: 767.98px) {
    .customer-services-tabs-wrap {
        padding-left: 1rem;
        padding-right: 1rem;
        overflow: visible;
    }

    .customer-services-tabs {
        flex-wrap: wrap;
        gap: 0.4rem;
        padding-bottom: 0.85rem;
    }

    .customer-services-page .navPills .nav-item {
        width: calc(50% - 0.25rem);
        flex: 1 1 calc(50% - 0.25rem);
        max-width: calc(50% - 0.25rem);
    }

    .customer-services-tab.nav-link {
        width: 100%;
        flex: 1 1 auto;
        max-width: none;
        padding: 0.45rem 0.65rem;
        font-size: 0.8125rem;
        white-space: normal;
        text-align: center;
    }

    .customer-services-body {
        padding: 1.25rem 1rem 1.5rem;
    }
}
