﻿/*
 * payments.css
 * Styles for the gateway-agnostic Payments page / Fund Wallet modal.
 * Palette matches static-wallet.css / fund-account.css for consistency.
 */

.pay-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 0;
}

.pay-card {
    border: 1px solid #cdd7ef;
    border-radius: 10px;
    overflow: hidden;
}

.pay-cta {
    text-align: center;
    padding: 28px 20px;
}

.pay-cta-icon {
    font-size: 32px;
    color: #3c8dbc;
    margin-bottom: 10px;
}

.pay-hint {
    color: #6b7a99;
    font-size: 13px;
    margin: 8px 0 16px;
}

/* ── Primary button ──────────────────────────────────────────────────── */
.pay-btn-primary {
    background-color: #3c8dbc;
    border-color: #3c8dbc;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 500;
    position: relative;
}

    .pay-btn-primary:hover {
        background-color: #347ca5;
    }

    .pay-btn-primary:disabled {
        opacity: 0.6;
    }

.pay-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: pay-spin 0.6s linear infinite;
}

.pay-loading .pay-btn-label {
    visibility: hidden;
}

.pay-loading .pay-spinner {
    display: block;
}

@keyframes pay-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Modal shell ──────────────────────────────────────────────────────── */
.pay-modal-content {
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

.pay-panel {
    display: none;
}

    .pay-panel.active {
        display: block;
        animation: pay-fade-in 0.2s ease;
    }

@keyframes pay-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Form fields ──────────────────────────────────────────────────────── */
.pay-field .pay-err {
    display: none;
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.pay-field.has-error .form-control {
    border-color: #dc3545;
}

.pay-field.has-error .pay-err {
    display: block;
}

/* ── Alerts ───────────────────────────────────────────────────────────── */
.pay-alert {
    display: none;
    background: #fdecea;
    color: #b02a37;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}

    .pay-alert.show {
        display: block;
    }

/* ── Waiting panel — account display ─────────────────────────────────── */
.pay-account-box {
    background: linear-gradient(135deg, #f4f7ff 0%, #e9efff 100%);
    border: 1px solid #cdd7ef;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
}

.pay-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7a99;
}

.pay-amount {
    font-size: 26px;
    font-weight: 700;
    color: #1b2a4a;
    margin-bottom: 10px;
}

.pay-account-number {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #1b2a4a;
}

.pay-bank-code {
    color: #44546f;
    font-size: 13px;
    margin-top: 4px;
}

.pay-polling-indicator {
    text-align: center;
    color: #3c8dbc;
    font-size: 13px;
    margin: 8px 0 16px;
}

.pay-polling-stalled {
    text-align: center;
    margin: 8px 0 16px;
}

.pay-link-btn {
    display: block;
    margin: 0 auto;
    background: none;
    border: none;
    color: #3c8dbc;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

    .pay-link-btn:hover {
        text-decoration: underline;
    }

/* ── Success panel ────────────────────────────────────────────────────── */
.pay-success-body {
    text-align: center;
    padding: 32px 24px;
}

.pay-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;
}

.pay-success-amount {
    font-size: 22px;
    font-weight: 700;
    color: #1b2a4a;
    margin: 4px 0 18px;
}

/* ───────────────────────────────────────────────────────────────────────
 * Dark mode — body.skin-blue
 * ─────────────────────────────────────────────────────────────────────── */
body.skin-blue .pay-card,
body.skin-blue .pay-modal-content {
    background: #1e2638;
    border-color: #2c3650;
}

body.skin-blue .pay-cta-icon {
    color: #5dade2;
}

body.skin-blue .pay-hint,
body.skin-blue .pay-label {
    color: #9aa7c7;
}

body.skin-blue .pay-card h5,
body.skin-blue .pay-modal-content .modal-title {
    color: #e8ecf7;
}

body.skin-blue .pay-modal-content .close {
    color: #f4f6fb;
    text-shadow: none;
    opacity: 0.7;
}

    body.skin-blue .pay-modal-content .close:hover {
        opacity: 1;
    }

body.skin-blue .pay-modal-content label {
    color: #d3d9ec;
}

body.skin-blue .pay-account-box {
    background: linear-gradient(135deg, #1a2236 0%, #222c46 100%);
    border-color: #2c3650;
}

body.skin-blue .pay-amount,
body.skin-blue .pay-account-number,
body.skin-blue .pay-success-amount {
    color: #f4f6fb;
}

body.skin-blue .pay-bank-code {
    color: #c2cae3;
}

body.skin-blue .pay-link-btn,
body.skin-blue .pay-polling-indicator {
    color: #7ec1e8;
}

body.skin-blue .pay-success-icon {
    background: rgba(40, 167, 69, 0.15);
    color: #5fd685;
}

/* ── Dashboard skeleton (shown briefly while /Widget AJAX call resolves) ─ */
.pay-skeleton {
    font-size: 13px;
}

    .pay-skeleton .fa-spinner {
        color: #3c8dbc;
        margin-right: 6px;
    }
