﻿/*
 * static-wallet.css
 * Styles for the static wallet dashboard card + BVN/OTP modal.
 *
 * Drop into: ~/css/static-wallet.css
 * Reference: <link rel="stylesheet" href="~/css/static-wallet.css" asp-append-version="true" />
 *
 * Palette intentionally matches the light-blue accent already used for
 * .message-dropdown in _BackendLayout.cshtml (#e9efff / #cdd7ef) so this
 * widget feels native to the existing skin-blue AdminLTE theme rather than
 * introducing a new colour language.
 */

/* ── Dashboard card ───────────────────────────────────────────────────── */
.sw-card {
    border: 1px solid #cdd7ef;
    border-radius: 10px;
    overflow: hidden;
}

.sw-cta {
    text-align: center;
    padding: 28px 20px;
}

.sw-cta-icon {
    font-size: 32px;
    color: #3c8dbc;
    margin-bottom: 10px;
}

.sw-cta h5 {
    margin-bottom: 6px;
    font-weight: 600;
}

.sw-hint {
    color: #6b7a99;
    font-size: 13px;
    margin: 8px 0 0;
}

/* ── Active wallet card ───────────────────────────────────────────────── */
.sw-active {
    background: linear-gradient(135deg, #f4f7ff 0%, #e9efff 100%);
}

.sw-active-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.sw-bank-icon {
    font-size: 28px;
    color: #3c8dbc;
    background: #ffffff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(60, 141, 188, 0.2);
    flex-shrink: 0;
}

.sw-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7a99;
}

.sw-account-number {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #1b2a4a;
}

.sw-account-name {
    color: #44546f;
    margin-bottom: 14px;
    font-size: 14px;
}

.sw-copy-btn {
    background: #ffffff;
    border: 1px solid #cdd7ef;
    color: #3c8dbc;
    border-radius: 6px;
    font-size: 13px;
}

    .sw-copy-btn:hover {
        background: #f4f7ff;
    }

/* ── Primary button ──────────────────────────────────────────────────── */
.sw-btn-primary {
    background-color: #3c8dbc;
    border-color: #3c8dbc;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 500;
    position: relative;
    transition: background-color 0.15s ease;
}

    .sw-btn-primary:hover {
        background-color: #347ca5;
    }

    .sw-btn-primary:disabled {
        opacity: 0.6;
    }

/* Inline loading state — swaps label for a spinner without changing button size */
.sw-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -8px;
    margin-top: -8px;
    animation: sw-spin 0.6s linear infinite;
}

.sw-loading .sw-btn-label {
    visibility: hidden;
}

.sw-loading .sw-spinner {
    display: block;
}

@keyframes sw-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Modal shell ──────────────────────────────────────────────────────── */
.sw-modal-content {
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

.sw-panel {
    display: none;
}

    .sw-panel.active {
        display: block;
        animation: sw-fade-in 0.2s ease;
    }

@keyframes sw-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Step indicator ───────────────────────────────────────────────────── */
.sw-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 0 0;
}

.sw-step {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e6ecfa;
    color: #6b7a99;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

    .sw-step.active {
        background: #3c8dbc;
        color: #ffffff;
    }

    .sw-step.done {
        background: #28a745;
        color: #ffffff;
    }

.sw-step-line {
    width: 60px;
    height: 2px;
    background: #e6ecfa;
    margin: 0 8px;
}

    .sw-step-line.done {
        background: #28a745;
    }

/* ── Form fields ──────────────────────────────────────────────────────── */
.sw-field .sw-err {
    display: none;
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.sw-field.has-error .form-control {
    border-color: #dc3545;
}

.sw-field.has-error .sw-err {
    display: block;
}

.sw-optional {
    color: #9aa6c2;
    font-weight: 400;
}

.sw-privacy-note {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7a99;
    font-size: 12px;
}

/* ── "BVN on file" confirmation block ─────────────────────────────────── */
.sw-bvn-onfile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f4f7ff;
    border: 1px solid #cdd7ef;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

    .sw-bvn-onfile i {
        font-size: 18px;
        color: #3c8dbc;
    }

.sw-bvn-onfile-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7a99;
}

.sw-bvn-onfile-value {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #1b2a4a;
}

/* ── Alerts ───────────────────────────────────────────────────────────── */
.sw-alert {
    display: none;
    background: #fdecea;
    color: #b02a37;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}

    .sw-alert.show {
        display: block;
    }

/* ── OTP boxes ────────────────────────────────────────────────────────── */
.sw-otp-desc {
    color: #6b7a99;
    font-size: 13px;
    margin-bottom: 16px;
}

.sw-otp-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sw-otp-box {
    width: 42px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border: 1px solid #cdd7ef;
    border-radius: 8px;
    transition: border-color 0.15s ease, transform 0.1s ease;
}

    .sw-otp-box:focus {
        border-color: #3c8dbc;
        outline: none;
        box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.15);
    }

    .sw-otp-box.filled {
        border-color: #3c8dbc;
    }

    .sw-otp-box.otp-err {
        border-color: #dc3545;
        animation: sw-shake 0.3s ease;
    }

@keyframes sw-shake {
    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

.sw-otp-footer {
    text-align: center;
    margin-top: 4px;
}

.sw-link-btn {
    background: none;
    border: none;
    color: #3c8dbc;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

    .sw-link-btn:hover {
        text-decoration: underline;
    }

/* ── Success panel ────────────────────────────────────────────────────── */
.sw-success-body {
    text-align: center;
    padding: 32px 24px;
}

.sw-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e6f7ec;
    color: #28a745;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.sw-success-account {
    font-size: 22px;
    font-weight: 700;
    color: #1b2a4a;
    margin-top: 4px;
}

.sw-success-name {
    color: #6b7a99;
    margin-bottom: 18px;
}

/* ── Dashboard skeleton (shown briefly while /Wallet AJAX call resolves) ─ */
.sw-skeleton {
    font-size: 13px;
}

    .sw-skeleton .fa-spinner {
        color: #3c8dbc;
        margin-right: 6px;
    }

/* ───────────────────────────────────────────────────────────────────────
 * Dark mode — body.skin-blue (per AdminLTE setup: skin-blue = dark,
 * skin-blue-light = light). Everything above this point was written
 * light-only; these overrides darken backgrounds/text for the widget +
 * modal without touching Bootstrap's own .form-control (already themed
 * by the existing skin CSS) so inputs keep matching the rest of the site.
 *
 * Hex values here are a reasonable dark-navy palette, not pulled from your
 * actual skin-blue stylesheet (not in scope here) — nudge them to match
 * exactly once you can compare side-by-side with another dark card.
 * ─────────────────────────────────────────────────────────────────────── */

body.skin-blue .sw-card {
    background: #1e2638;
    border-color: #2c3650;
}

body.skin-blue .sw-cta-icon {
    color: #5dade2;
}

body.skin-blue .sw-hint,
body.skin-blue .sw-otp-desc,
body.skin-blue .sw-privacy-note,
body.skin-blue .sw-success-name {
    color: #9aa7c7;
}

body.skin-blue .sw-cta h5 {
    color: #e8ecf7;
}

/* ── Active wallet card ──────────────────────────────────────────────── */
body.skin-blue .sw-active {
    background: linear-gradient(135deg, #1a2236 0%, #222c46 100%);
}

body.skin-blue .sw-bank-icon {
    background: #2a3450;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

body.skin-blue .sw-label {
    color: #8b97b8;
}

body.skin-blue .sw-account-number {
    color: #f4f6fb;
}

body.skin-blue .sw-account-name {
    color: #c2cae3;
}

body.skin-blue .sw-copy-btn {
    background: #2a3450;
    border-color: #3a4568;
    color: #7ec1e8;
}

    body.skin-blue .sw-copy-btn:hover {
        background: #323e60;
    }

/* ── Modal shell ──────────────────────────────────────────────────────── */
body.skin-blue .sw-modal-content {
    background: #1a2236;
}

    body.skin-blue .sw-modal-content .modal-title {
        color: #f4f6fb;
    }

    /* Bootstrap 4's .close defaults to black text — invisible on a dark modal. */
    body.skin-blue .sw-modal-content .close {
        color: #f4f6fb;
        text-shadow: none;
        opacity: 0.7;
    }

        body.skin-blue .sw-modal-content .close:hover {
            opacity: 1;
        }

    body.skin-blue .sw-modal-content label {
        color: #d3d9ec;
    }

body.skin-blue .sw-optional {
    color: #6b7796;
}

body.skin-blue .sw-bvn-onfile {
    background: #222c46;
    border-color: #3a4568;
}

body.skin-blue .sw-bvn-onfile-label {
    color: #8b97b8;
}

body.skin-blue .sw-bvn-onfile-value {
    color: #f4f6fb;
}

/* ── Step indicator ──────────────────────────────────────────────────── */
body.skin-blue .sw-step {
    background: #2a3450;
    color: #9aa7c7;
}

body.skin-blue .sw-step-line {
    background: #2a3450;
}

/* ── Alerts ───────────────────────────────────────────────────────────── */
body.skin-blue .sw-alert {
    background: rgba(220, 53, 69, 0.15);
    color: #ff8a93;
    border-color: rgba(220, 53, 69, 0.35);
}

/* ── OTP boxes ────────────────────────────────────────────────────────── */
body.skin-blue .sw-otp-box {
    background: #222c46;
    border-color: #3a4568;
    color: #f4f6fb;
}

    body.skin-blue .sw-otp-box.filled {
        border-color: #5dade2;
    }

body.skin-blue .sw-link-btn {
    color: #7ec1e8;
}

/* ── Success panel ────────────────────────────────────────────────────── */
body.skin-blue .sw-success-icon {
    background: rgba(40, 167, 69, 0.15);
    color: #5fd685;
}

body.skin-blue .sw-success-account {
    color: #f4f6fb;
}
