/* ============================================================
   NOWPayments panel — additional.cshtml inline payment UI
   ============================================================ */

/* ---- Button — inherits all base sizing from recursion.css ---- */
.nowpayments-wrapper {
    margin-left: 10px;
}

/* Match the stripe-button-container button style but with NOWPayments brand colour */
    .nowpayments-wrapper button {
        color: white !important;
        cursor: pointer !important;
        background: #9b700f !important;
        box-shadow: 0 16px 40px 1px rgba(0, 166, 81, 0.30) !important;
    }

/* ---- Main panel ---- */
#nowpayments-main {
    flex: 1 1 auto;
    min-width: 520px;
    color: #e0e9f5;
}

#nowpayments-main h4 {
    color: #7ec8e3;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.03em;
}

/* ---- Currency selector ---- */
#npCurrencyStep label {
    display: block;
    font-size: 0.82rem;
    color: #8ca8c5;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- Currency cards grid ---- */
#npCurrencyCards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.np-currency-card {
    border: 1px solid #323231;
    border-radius: 10px;
    padding: 18px 20px;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    user-select: none;
}

.np-currency-card:hover {
    border-color: #2563eb;
    background: #0e2540;
}

.np-currency-card.np-selected {
    border-color: #2563eb;
    background: #0e2540;
}

.np-currency-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.np-currency-name {
    font-size: 1rem;
    font-weight: 600;
    color: #e0e9f5;
    margin: 0 0 3px;
    line-height: 1.2;
}

.np-currency-network {
    font-size: 0.8rem;
    color: #8ca8c5;
    margin: 0;
    line-height: 1.2;
}

.np-check-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #1e3a5a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.18s, background 0.18s;
}

.np-selected .np-check-circle {
    border-color: #2563eb;
    background: #2563eb;
}

.np-checkmark {
    color: #fff;
    font-size: 0.72rem;
    line-height: 1;
    display: none;
}

.np-selected .np-checkmark {
    display: block;
}

.np-currency-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.np-currency-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

#npGenerateBtn {
    width: 100%;
    padding: 11px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#npGenerateBtn:disabled {
    background: #1e3d6b;
    cursor: not-allowed;
    opacity: 0.7;
}

#npGenerateBtn:not(:disabled):hover {
    background: #1d4fd8;
}

/* ---- Payment details ---- */
#npPaymentDetails {
    margin-top: 18px;
}

.np-amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0c1e30;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.93rem;
}

.np-amount-row .np-label {
    color: #8ca8c5;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 3px;
}

.np-amount-row .np-value {
    font-weight: 700;
    color: #e0e9f5;
    font-size: 1rem;
}

/* ---- Payment details overrides ---- */
#nowpayments-main img.copy-address {
    width: 12px;
}

#nowpayments-main .copy-address-container {
    padding: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#nowpayments-main .qrImg {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

/* ---- Address block ---- */
.np-address-block {
    background: #0c1e30;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.np-address-block .np-label {
    color: #8ca8c5;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 6px;
}

.np-address-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

#npPayAddress {
    font-family: monospace;
    font-size: 0.82rem;
    color: #7ec8e3;
    word-break: break-all;
    flex: 1;
}

#npCopyAddress {
    border: none;
    border-radius: 6px;
    color: #7ec8e3;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: background 0.2s;
}

#npCopyAddress:hover {
    background: #2a5078;
}

#npCopyFeedback {
    display: none;
    font-size: 0.75rem;
    color: #4ade80;
    margin-top: 4px;
}

/* ---- QR code ---- */
.np-qr-wrapper {
    display: flex;
    justify-content: center;
    margin: 14px 0;
}

#npQRCode {
    border-radius: 8px;
    width: 160px;
    height: 160px;
}

/* ---- Status bar ---- */
#npStatusBar {
    padding: 10px 14px;
    border-radius: 8px;
    background: #0c2340;
    border-left: 4px solid #2563eb;
    font-size: 0.88rem;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#npStatusBar::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563eb;
    flex-shrink: 0;
    animation: np-pulse 1.4s infinite;
}

#npStatusBar.np-status-finished {
    border-left-color: #4ade80;
}

#npStatusBar.np-status-finished::before {
    background: #4ade80;
    animation: none;
}

#npStatusBar.np-status-failed {
    border-left-color: #f87171;
}

#npStatusBar.np-status-failed::before {
    background: #f87171;
    animation: none;
}

#npCountdown {
    margin-left: auto;
    font-size: 0.78rem;
    color: #8ca8c5;
}

@keyframes np-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* ---- Error ---- */
#npError {
    display: none;
    margin-top: 10px;
    padding: 10px 14px;
    background: #3b0f0f;
    border-left: 4px solid #f87171;
    border-radius: 6px;
    color: #fca5a5;
    font-size: 0.85rem;
}

/* ============================================================
   NOWPayments checkout / invoice page
   ============================================================ */
.xpal-invoice {
    padding: 40px 0;
    min-height: 80vh;
}

.success-wrapper {
    margin-bottom: 24px;
}

.success-div h3 {
    color: #1a3a5c;
    font-weight: 700;
}

.invoice-heading {
    color: #1a3a5c;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.top-text {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8ca8c5;
    margin-bottom: 2px;
}

.bottom-text {
    font-weight: 600;
    color: #1a3a5c;
}

.total-amount-div {
    padding: 14px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
}

.total-amount {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a3a5c;
}

.downloadBtn {
    background: #2563eb;
    color: #fff;
    padding: 9px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    margin-right: 10px;
    transition: background 0.2s;
}

.downloadBtn:hover {
    background: #1d4fd8;
    color: #fff;
}

.continueBtn {
    background: #0e1f33;
    color: #e0e9f5;
    padding: 9px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.continueBtn:hover {
    opacity: 0.85;
    color: #e0e9f5;
}

.hidden {
    display: none !important;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
    #nowpayments-main {
        width: 100%;
        margin-top: 80px;
    }
}

@media (max-width: 768px) {
    #nowpayments-main {
        margin-top: 40px;
    }

    #npCurrencyCards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    #npCurrencyCards {
        grid-template-columns: 1fr 1fr;
    }
}
