.legacy-reference.inner-page .legacy-page-content {
    box-sizing: border-box;
    min-height: 620px;
    background: #383838;
    color: #fff;
}

.legacy-reference.desktop.inner-page .legacy-page-content {
    padding: 36px 0 70px;
}

.legacy-reference.mobile.inner-page .legacy-page-content--mobile {
    width: 100%;
    min-height: 520px;
    padding: 18px 0 85px;
    overflow-x: hidden;
}

/* The reference register page starts directly below the mobile header. Its form surface is
   black; the generic internal-page shell is grey for the other legacy surfaces. */
.legacy-reference.mobile.register .legacy-page-content--mobile {
    background: transparent;
}

.legacy-reference.desktop.register .legacy-page-content {
    min-height: 0;
    padding: 0;
    background: transparent;
}

.legacy-reference.mobile.register .legacy-page-content--mobile {
    min-height: 0;
    padding: 0;
    overflow: visible;
}

.legacy-reference.mobile.register .legacy-register-page .register-form .form-group {
    padding-left: 0;
    padding-right: 0;
}

.legacy-reference.mobile.register #apk-down-bar {
    display: none !important;
}

.legacy-reference.inner-page .legacy-page-content a {
    text-decoration: none;
}

.legacy-reference.inner-page .legacy-page-content .container {
    box-sizing: border-box;
}

/* Promotion catalogue: ported from desktop/m promotion.php. */
.legacy-promotions-page {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
}

.legacy-promotions-page .promo-list {
    padding: 0 15px;
}

.legacy-promotions-page .promotion-page {
    width: 100%;
}

.legacy-promotions-page .g_category-nav {
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    margin: 0 0 22px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgb(80 176 139 / 55%);
    background: var(--theme-color-primary, #005334);
    list-style: none;
}

.legacy-promotions-page .g_category-nav .nav-item {
    flex: 1 1 0;
    min-width: 0;
    border-right: 1px solid rgb(255 255 255 / 12%);
    text-align: center;
}

.legacy-promotions-page .g_category-nav .nav-item:last-child {
    border-right: 0;
}

.legacy-promotions-page .g_category-nav .navlink {
    display: block;
    padding: 13px 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.legacy-promotions-page .g_category-nav .nav-item:first-child .navlink,
.legacy-promotions-page .g_category-nav .navlink:hover {
    background: var(--theme-color-light, #50b08b);
    color: #fff;
}

.legacy-promotions-page .promotion-group {
    display: grid;
    gap: 16px;
}

.legacy-promotions-page .promotion-single {
    padding: 18px;
    border: 1px solid rgb(80 176 139 / 45%);
    background: #474747;
    box-shadow: 0 7px 18px rgb(0 0 0 / 18%);
}

.legacy-promotions-page .promotion-single .row {
    display: flex;
    align-items: center;
}

.legacy-promotions-page .promotion-single img,
.legacy-promotion-detail .promobanner_img img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
}

.legacy-promotions-page .promotion-single .title,
.legacy-promotion-detail .title {
    margin: 0 0 8px;
    color: #d4b918;
    font-size: 19px;
    line-height: 1.35;
    text-transform: uppercase;
}

.legacy-promo-summary,
.legacy-promo-description {
    margin: 0 0 12px;
    color: #eee;
    font-size: 13px;
    line-height: 1.6;
}

.legacy-promotions-page .time-remaining-wraper {
    padding: 0;
}

.legacy-promotions-page .time-remaining {
    color: #bfc9c5;
    font-size: 12px;
}

.legacy-promotions-page .time-remaining i {
    color: #d4b918;
}

.legacy-promotions-page .time-remaining-value h4 {
    margin: 8px 0 0;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

.legacy-empty-state {
    padding: 60px 20px;
    border: 1px solid rgb(80 176 139 / 45%);
    background: #474747;
    text-align: center;
}

.legacy-empty-state i {
    color: #d4b918;
    font-size: 36px;
}

.legacy-page-back {
    margin-bottom: 15px;
}

.legacy-promotion-detail {
    position: relative;
    width: 100%;
    margin: 0;
    color: #fff;
}

.legacy-promotion-detail .md-content {
    overflow: hidden;
    border: 1px solid rgb(80 176 139 / 55%);
    background: #474747;
}

.legacy-promotion-detail .md-head {
    padding: 12px 18px;
    background: var(--theme-color-primary, #005334);
}

.legacy-detail-label {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.legacy-promotion-detail .md-body {
    padding: 22px;
}

.legacy-promotion-detail .legacy-promo-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.legacy-promotion-detail .legacy-promo-facts div {
    min-width: 95px;
    padding: 8px 10px;
    border: 1px solid rgb(212 185 24 / 45%);
    background: #383838;
}

.legacy-promotion-detail .legacy-promo-facts dt {
    color: #aaa;
    font-size: 10px;
    text-transform: uppercase;
}

.legacy-promotion-detail .legacy-promo-facts dd {
    margin: 3px 0 0;
    color: #d4b918;
    font-weight: 700;
}

.legacy-promo-terms {
    margin-top: 24px !important;
    padding: 18px 20px;
    border-left: 4px solid var(--theme-color-light, #50b08b);
    background: #383838;
    color: #eee;
    line-height: 1.65;
}

.legacy-promo-terms ol {
    margin: 10px 0 0;
    padding-left: 22px;
}

/* Registration: uses the original register.php hierarchy and form classes. */
.legacy-register-page {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    color: #fff;
}

.legacy-register-page .field-wrap {
    position: relative;
}

.legacy-register-page #isShowEwalletOptions,
.legacy-register-page #isShowEwalletLable,
.legacy-register-page .isShowEwalletMsg {
    display: none !important;
}

.legacy-register-page form:has(#radioEwallet7:checked) #isShowBankOptions,
.legacy-register-page form:has(#radioEwallet7:checked) #isShowBankLable,
.legacy-register-page form:has(#method option[value="7"]:checked) #isShowBankOptions,
.legacy-register-page form:has(#method option[value="7"]:checked) #isShowBankLable {
    display: none !important;
}

.legacy-register-page form:has(#radioEwallet7:checked) #isShowEwalletOptions,
.legacy-register-page form:has(#radioEwallet7:checked) #isShowEwalletLable,
.legacy-register-page form:has(#radioEwallet7:checked) .isShowEwalletMsg,
.legacy-register-page form:has(#method option[value="7"]:checked) #isShowEwalletOptions,
.legacy-register-page form:has(#method option[value="7"]:checked) #isShowEwalletLable,
.legacy-register-page form:has(#method option[value="7"]:checked) .isShowEwalletMsg {
    display: block !important;
}

/* Login, forgot password and PIN use the exact legacy modal-card vocabulary in-flow. */
.legacy-auth-stage {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    min-height: 520px;
    padding: 28px 15px 50px;
}

.legacy-auth-card.modal-wrapper.nifty-modal {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    display: block !important;
    width: 420px;
    max-width: 100%;
    margin: 0 auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
}

.legacy-auth-card.modal-wrapper.nifty-modal > .md-content {
    opacity: 1 !important;
    transform: none !important;
}

.legacy-auth-card .md-content {
    overflow: hidden;
    border: 1px solid rgb(80 176 139 / 65%);
    border-radius: 0;
    background: #5d5d5d;
    color: #fff;
    box-shadow: 0 14px 32px rgb(0 0 0 / 35%);
}

.legacy-auth-card .md-body {
    padding: 0;
    color: inherit;
}

.legacy-auth-card .modal-header {
    position: relative;
    min-height: 50px;
    padding: 14px 15px;
    border-bottom: 1px solid rgb(255 255 255 / 13%);
}

.legacy-auth-title-wrap {
    width: 100%;
}

.legacy-auth-card .modal-title {
    margin: 0;
    color: var(--theme-color-light, #50b08b);
    font-size: 18px;
}

.legacy-auth-card .legacy-auth-back {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    color: var(--theme-accent, #d4b918);
}

.legacy-auth-card .modal-body {
    padding: 20px 30px 12px;
}

.legacy-auth-card .form-group {
    margin-bottom: 17px;
}

.legacy-auth-card .form-group > label {
    display: block;
    margin-bottom: 7px;
    color: #fff;
    font-weight: 700;
}

.legacy-auth-card .icon-input {
    position: relative;
}

.legacy-auth-card .form-control {
    box-sizing: border-box;
    width: 100%;
    min-height: 50px;
    border: 1px solid #ede198;
    background: transparent;
    color: #fff;
}

.legacy-auth-card .icon-input .left {
    position: absolute;
    top: 16px;
    left: 17px;
    color: #fff;
}

.legacy-auth-card .toggle-password {
    position: absolute;
    top: 16px;
    right: 16px;
    cursor: pointer;
}

.legacy-auth-card .btn-block {
    width: 100%;
    margin-right: 0;
}

.legacy-auth-card .modal-footer {
    padding: 15px 30px 20px;
    border-top: 1px solid rgb(255 255 255 / 13%);
    background: #474747;
}

.legacy-auth-card .modal-footer a,
.legacy-auth-card .btn-link {
    color: var(--theme-accent, #d4b918);
}

.legacy-contact-choice {
    display: flex;
}

.legacy-contact-choice .radio_2 {
    flex: 1;
}

.legacy-contact-choice .radio_2 label {
    min-height: 42px;
}

.legacy-phone-input {
    display: flex;
}

.legacy-forgot-form .legacy-phone-field {
    display: none;
}

.legacy-forgot-form:has(#forgot-mobile-method:checked) .legacy-email-field {
    display: none;
}

.legacy-forgot-form:has(#forgot-mobile-method:checked) .legacy-phone-field {
    display: block;
}

.legacy-phone-input .input-group-addon {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #ede198;
    border-right: 0;
    background: #383838;
}

.legacy-captcha-row {
    display: flex;
    align-items: stretch;
}

.legacy-captcha-code {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border: 1px solid #d4b918;
    background: #383838;
    color: #d4b918;
    font-family: monospace;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .2em;
}

.legacy-pin-form .pin-in-grp {
    display: flex;
    overflow: hidden;
}

.legacy-pin-form .pin-in-grp .pincode {
    width: 16.666% !important;
    padding: 4px;
    border-right-width: 0;
    text-align: center;
}

.legacy-pin-form .pin-in-grp .pincode:last-child {
    border-right-width: 1px;
}

.legacy-pin-keypad .row {
    display: flex;
    flex-wrap: wrap;
}

.legacy-pin-keypad .col-xs-4 {
    width: 33.333%;
    padding: 5px;
}

.legacy-pin-keypad .btn {
    min-height: 42px;
    margin: 0;
}

@media (max-width: 991px) {
    .legacy-reference.mobile.inner-page .legacy-page-content--mobile {
        padding-top: 12px;
    }

    .legacy-promotions-page .promo-list {
        padding: 0 10px;
    }

    .legacy-promotions-page .g_category-nav {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .legacy-promotions-page .g_category-nav .nav-item {
        flex: 0 0 86px;
    }

    .legacy-promotions-page .g_category-nav .navlink {
        padding: 11px 5px;
        font-size: 10px;
    }

    .legacy-promotions-page .promotion-single {
        padding: 12px;
    }

    .legacy-promotions-page .promotion-single .row,
    .legacy-promotion-detail .md-body > .row {
        display: block;
    }

    .legacy-promotions-page .promotion-single img,
    .legacy-promotion-detail .promobanner_img img {
        max-height: none;
    }

    .legacy-promotions-page .promotion-single .title {
        margin-top: 12px;
        font-size: 16px;
    }

    .legacy-promotions-page .time-remaining-wraper {
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px solid rgb(255 255 255 / 12%);
    }

    .legacy-promotion-detail .md-body {
        padding: 14px;
    }

    .legacy-auth-stage {
        min-height: 480px;
        padding: 10px 15px 35px;
    }

    .legacy-auth-card.modal-wrapper.nifty-modal {
        width: 100%;
    }

    .legacy-auth-card .modal-body {
        padding: 18px 15px 8px;
    }

    .legacy-auth-card .modal-footer {
        padding: 14px 15px 18px;
    }

}

/* Exact /promotion catalogue geometry from the reference surface. */
.legacy-reference.promotion .legacy-page-content {
    background: #000;
}

.legacy-reference.desktop.promotion .legacy-page-content {
    padding: 0;
}

.legacy-reference.promotion .legacy-promotions-page {
    max-width: 1170px;
}

.legacy-reference.promotion .legacy-promotions-page .promo-list {
    padding: 0;
}

.legacy-reference.promotion .legacy-promotions-page .g_category-nav {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: var(--theme-color-primary, #005334);
}

.legacy-reference.promotion .legacy-promotions-page .g_category-nav .nav-item {
    flex: 0 0 16.6667%;
    min-width: 16.6667%;
    max-width: 16.6667%;
    border: 0;
    background: var(--theme-color-primary, #005334);
}

.legacy-reference.promotion .legacy-promotions-page .g_category-nav .nav-item:first-child .navlink {
    background: transparent;
    color: #fff;
}

.legacy-reference.promotion .legacy-promotions-page .g_category-nav .nav-item.active .navlink,
.legacy-reference.promotion .legacy-promotions-page .g_category-nav .nav-item:hover .navlink {
    background: #818181;
    color: #333;
}

.legacy-reference.promotion .legacy-promotions-page .g_category-nav .navlink {
    padding: .7em;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
}

.legacy-reference.promotion .legacy-promotions-page .promotion-group {
    display: block;
    padding: 30px 0;
}

.legacy-reference.promotion .legacy-promotions-page .promotion-single {
    margin: 0 0 15px;
    padding: 0;
    border: 0;
    background: rgb(0 0 0 / 30%);
    box-shadow: none;
}

.legacy-reference.promotion .legacy-promotions-page .promotion-single .row {
    display: flex;
    align-items: initial;
}

.legacy-reference.promotion .legacy-promotions-page .promotion-single img {
    width: 100%;
    height: 160px;
    max-height: none;
    object-fit: cover;
}

.legacy-reference.promotion .legacy-promotions-page .promotion-single .title {
    margin: 21px 0 10.5px;
    color: var(--theme-color-light, #50b08b);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
}

.legacy-reference.promotion .legacy-promotions-page .time-remaining-wraper {
    padding: 0;
}

.legacy-reference.promotion .legacy-promotions-page .time-remaining {
    color: #fff;
    font-size: 14px;
}

.legacy-reference.promotion .legacy-promotions-page .time-remaining i {
    color: #fff;
}

.legacy-reference.promotion .legacy-promotions-page .time-remaining-value h4 {
    margin: 0;
    color: var(--theme-color-light, #50b08b);
    font-size: 18px;
    font-weight: 500;
}

.legacy-reference.promotion .legacy-promo-modal:target {
    visibility: visible;
}

.legacy-reference.promotion .legacy-promo-modal:target > .md-content {
    opacity: 1;
    transform: translateY(0);
}

.legacy-reference.promotion .legacy-promo-modal:target + .legacy-promo-modal-overlay {
    opacity: 1;
    visibility: visible;
}

.legacy-reference.promotion .legacy-promo-modal .md-close {
    z-index: 2;
    color: #fff;
}

.legacy-reference.promotion .legacy-reference-promo-terms {
    color: #fff;
    line-height: 1.5;
}

.legacy-reference.promotion .legacy-reference-promo-terms th,
.legacy-reference.promotion .legacy-reference-promo-terms td {
    border-color: rgb(255 255 255 / 35%);
    color: #fff;
}

@media (max-width: 991px) {
    .legacy-reference.mobile.promotion .legacy-page-content--mobile {
        padding: 12px 0 85px;
    }

    .legacy-reference.mobile.promotion .legacy-promotions-page .promo-list {
        padding: 0;
    }

    .legacy-reference.mobile.promotion .legacy-promotions-page .g_category-nav {
        justify-content: initial;
        overflow: visible;
    }

    .legacy-reference.mobile.promotion .legacy-promotions-page .g_category-nav .nav-item {
        flex: 0 0 16.6667%;
        min-width: 16.6667%;
        max-width: 16.6667%;
    }

    .legacy-reference.mobile.promotion .legacy-promotions-page .g_category-nav .navlink {
        padding: 15px 3px;
        font-size: 11px;
    }

    .legacy-reference.mobile.promotion .legacy-promotions-page .promotion-single {
        margin-bottom: 15px;
        padding: 0;
    }

    .legacy-reference.mobile.promotion .legacy-promotions-page .promotion-single .row {
        display: block;
    }

    .legacy-reference.mobile.promotion .legacy-promotions-page .promotion-single img {
        height: 160px;
    }

    .legacy-reference.mobile.promotion .legacy-promotions-page .promotion-single .title {
        margin: 0 0 10.5px;
        font-size: 18px;
    }

    .legacy-reference.mobile.promotion .legacy-promotions-page .time-remaining-wraper {
        display: none;
    }
}

/*
    legacy/desktop.css ships `.register-form .prev_btn,.register_form_three,.register_form_two{display:none}`
    — the reference hides stage two and the back button and reveals them from its own script.
    Here the [hidden] attribute is the single source of truth instead, so both stages stay
    visible (and the form stays submittable) when the stage script has not run.
*/
.legacy-reference .legacy-register-page .register_form_two {
    display: block;
}

.legacy-reference .legacy-register-page .register-form .prev_btn {
    display: inline-block;
}

.legacy-reference .legacy-register-page .register_form_two[hidden],
.legacy-reference .legacy-register-page [id^="register_form_two_"][hidden] {
    display: none;
}

@media (max-width: 991px) {
    .legacy-reference.mobile.register .legacy-page-content--mobile {
        padding: 0;
    }

    /* The live mobile register keeps its hints in the inline text flow. Keep
       this correction scoped to register so desktop and every other page retain
       the native legacy metrics. */
    .legacy-reference.mobile.register .legacy-register-page small {
        display: inline;
        width: auto;
    }

    .legacy-reference.mobile.register .register-email-hint--primary {
        letter-spacing: -0.12px;
    }

    .legacy-reference.mobile.register .register-email-hint--example {
        letter-spacing: -0.35px;
    }

    .legacy-reference.mobile.register .mobilesite-footer {
        height: 0;
        min-height: 0;
    }

    .legacy-reference.mobile.register .mobilesite-footer #collapsible-footer,
    .legacy-reference.mobile.register .mobilesite-footer .footer-body {
        display: none;
    }
}
