@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

/*
  PxelCode Pay — visual identity
  Palette drawn from the Bangladeshi taka note & flag: deep bottle green (trust, money)
  + a single red accent reserved for the one action that matters (submit).
  Warm parchment background instead of stark white/near-black, so the card reads
  like a printed receipt rather than a generic "fintech app" screen.
*/
.pxpay-fintech {
    --pxpay-ink: #15241d;
    --pxpay-muted: #5b6a63;
    --pxpay-primary: #0b6e4f;
    --pxpay-primary-dark: #084f39;
    --pxpay-primary-tint: #e7f3ee;
    --pxpay-accent: #d7263d;
    --pxpay-accent-dark: #b31e32;
    --pxpay-line: #e4e0d2;
    --pxpay-card: #ffffff;

    font-family: 'Inter', sans-serif;
    color: var(--pxpay-ink);
    background: var(--pxpay-card);
    border-radius: 22px;
    border: 1px solid var(--pxpay-line);
    overflow: hidden;
    max-width: 100%;
    box-shadow: 0 1px 3px rgba(21, 36, 29, 0.06);
    font-size: 16px;
}

/* Header strip */
.pxpay-strip {
    background: var(--pxpay-primary);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.pxpay-strip-lock { font-size: 14px; line-height: 1; }

/* Introduction Section */
.pxpay-intro {
    background: var(--pxpay-primary-tint);
    padding: 20px 22px;
    text-align: center;
    border-bottom: 1px solid var(--pxpay-line);
}
.pxpay-intro h4 {
    margin: 0 0 6px 0;
    color: var(--pxpay-ink);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 19px;
    font-weight: 700;
}
.pxpay-intro p { margin: 0; color: var(--pxpay-muted); font-size: 15px; line-height: 1.5; }

/* Tabs Header — underline segmented control */
.pxpay-header {
    display: flex;
    background: var(--pxpay-card);
    padding: 6px 14px 0;
    gap: 4px;
    border-bottom: 1px solid var(--pxpay-line);
}
.pxpay-tab-btn {
    flex: 1;
    padding: 14px 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--pxpay-muted);
    cursor: pointer;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    transition: 0.2s;
}
.pxpay-tab-btn:hover { color: var(--pxpay-ink); }
.pxpay-tab-btn.active {
    color: var(--pxpay-primary-dark);
    border-bottom-color: var(--pxpay-primary);
}

/* Body Content */
.pxpay-body { padding: 22px; display: none; }
.pxpay-body.active { display: block; animation: pxpaySlideUp 0.35s ease; }
.pxpay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; transition: 0.3s; }

/* Payment Card */
.pxpay-card {
    position: relative;
    background: #fff;
    padding: 18px 8px 16px;
    border-radius: 16px;
    text-align: center;
    border: 2px solid var(--pxpay-line);
    cursor: pointer;
    transition: 0.2s;
}
.pxpay-card:hover { border-color: var(--pxpay-primary); }
.pxpay-card img { height: 34px; margin-bottom: 10px; }
.pxpay-card span { font-size: 14px; font-weight: 600; display: block; color: var(--pxpay-ink); font-family: 'Space Grotesk', sans-serif; }

/* Selection Effects */
.selection-active-grid .pxpay-card:not(.selected) {
    opacity: 0.55 !important;
    filter: none !important;
}

.pxpay-card.selected, .pxpay-bank-card.selected {
    border-color: var(--pxpay-primary) !important;
    background: var(--pxpay-primary-tint) !important;
    opacity: 1 !important;
}
.pxpay-card.selected::after, .pxpay-bank-card.selected::after {
    content: "✓";
    position: absolute;
    top: -9px;
    right: -9px;
    width: 22px;
    height: 22px;
    background: var(--pxpay-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.pxpay-bank-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 2px solid var(--pxpay-line);
    border-radius: 16px;
    cursor: pointer;
    transition: 0.2s;
}
.pxpay-bank-card:hover { border-color: var(--pxpay-primary); }
.pxpay-bank-card img { height: 36px; width: auto; }
.pxpay-bank-card span { font-size: 15px; font-weight: 600; color: var(--pxpay-ink); font-family: 'Space Grotesk', sans-serif; }

/* iBanking grid is single-column since bank cards are wide/horizontal */
#pxpay-bank .pxpay-grid { grid-template-columns: 1fr; gap: 10px; }

/* Panel */
#pxpay-panel { border-top: 1px solid var(--pxpay-line); background: #fbfaf6; padding: 22px; animation: pxpayFadeIn 0.25s ease; }
.pxpay-panel-eyebrow {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pxpay-primary-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px dashed var(--pxpay-line);
}
.pxpay-info-box { background: #fff; border: 1.5px solid var(--pxpay-line); border-radius: 18px; overflow: hidden; }
.pxpay-info-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #f2efe6; gap: 12px; }
.pxpay-info-row:last-child { border-bottom: none; }
.pxpay-info-row-blue { background: var(--pxpay-primary-tint); }

/* Rows & Icons */
.pxpay-row-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.pxpay-icon-circle {
    width: 28px;
    height: 28px;
    background: var(--pxpay-primary-tint);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pxpay-icon-circle svg { width: 15px; height: 15px; color: var(--pxpay-primary-dark); }

/* Labels & Values */
.pxpay-label { font-size: 11.5px; color: var(--pxpay-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 3px; }
.pxpay-value { font-family: 'IBM Plex Mono', monospace; font-size: 16px; color: var(--pxpay-ink); font-weight: 600; word-break: break-all; line-height: 1.3; }
.pxpay-value-amount { color: var(--pxpay-primary-dark); font-size: 22px; }

/* Copy Button */
.pxpay-btn-copy {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    background: #fff !important;
    border: 1.5px solid var(--pxpay-line) !important;
    border-radius: 12px !important;
    color: var(--pxpay-muted) !important;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}
.pxpay-btn-copy svg {
    display: block !important;
    width: 19px !important;
    height: 19px !important;
    stroke: currentColor !important;
    stroke-width: 2;
    fill: none;
}
.pxpay-btn-copy:hover {
    color: var(--pxpay-primary-dark) !important;
    border-color: var(--pxpay-primary) !important;
    background: var(--pxpay-primary-tint) !important;
}

/* Inputs & Forms */
.pxpay-input-trx {
    width: 100%;
    padding: 15px 16px;
    border: 2px solid var(--pxpay-line);
    border-radius: 14px;
    margin-top: 12px;
    font-size: 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    color: var(--pxpay-ink);
    outline: none;
    transition: 0.2s;
    box-sizing: border-box;
    background: #fff;
}
.pxpay-input-trx::placeholder { font-family: 'Inter', sans-serif; color: #9aa39c; }
.pxpay-input-trx:focus { border-color: var(--pxpay-primary); }
.pxpay-slip-upload { margin-top: 14px; border: 2px dashed var(--pxpay-line); border-radius: 14px; padding: 18px; text-align: center; background: #fff; }
.pxpay-slip-upload input[type="file"] { font-size: 14px; font-family: 'Inter', sans-serif; width: 100%; }

/* QR code (shown when the admin has uploaded one for the selected method) */
.pxpay-qr-block {
    margin-top: 14px;
    padding: 16px;
    text-align: center;
    background: #fff;
    border: 1.5px dashed var(--pxpay-line);
    border-radius: 14px;
}
.pxpay-qr-block img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border: 1px solid var(--pxpay-line);
    border-radius: 12px;
    padding: 8px;
    background: #fff;
}
.pxpay-qr-block span {
    display: block;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--pxpay-muted);
    font-weight: 500;
}

/* Toast */
#pxpay-toast {
    visibility: hidden;
    background: var(--pxpay-ink);
    color: #fff;
    padding: 13px 26px;
    border-radius: 50px;
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: 0.3s;
    opacity: 0;
}
#pxpay-toast.show { visibility: visible; opacity: 1; bottom: 80px; }

/* Checkout note (shown inline at EDD checkout when this gateway is chosen) */
.pxpay-checkout-note {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    color: #084f39;
    background: #e7f3ee;
    border: 1px solid #cfe8dc;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 0;
    line-height: 1.5;
}

/* Animations */
@keyframes pxpaySlideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pxpayFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Small screens: keep tap targets large, don't shrink type further */
@media (max-width: 420px) {
    .pxpay-grid { gap: 10px; }
    .pxpay-card { padding: 14px 6px 12px; }
    .pxpay-value-amount { font-size: 19px; }
}
