/* =============================================
   Crypto Wallet WooCommerce — Checkout Styles
   ============================================= */

#ryanplugins-cww-payment-form {
    margin-top: 12px;
    font-size: 14px;
}

.ryanplugins-cww-description {
    color: #555;
    margin-bottom: 12px;
}

/* ── Network selector ── */
.ryanplugins-cww-network-select > label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 10px;
}

.ryanplugins-cww-network-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* Hide the native radio — we style the whole label as the button */
.ryanplugins-cww-network-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.ryanplugins-cww-network-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px 7px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;        /* pill shape */
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    background: #fff;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    user-select: none;
    white-space: nowrap;
    position: relative;
}

.ryanplugins-cww-network-label:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

/* Selected state */
.ryanplugins-cww-network-label:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    color: #1d4ed8;
}

.ryanplugins-cww-network-label:has(input:checked) .ryanplugins-cww-network-name {
    color: #1d4ed8;
}

/* Network coin icon — circular, fixed size */
.ryanplugins-cww-network-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.ryanplugins-cww-network-name {
    line-height: 1;
}

/* ── Coin icon SVGs ── */
.ryanplugins-cww-icon-cardano {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%230D1E2D'/%3E%3Ctext x='16' y='21' text-anchor='middle' font-size='16' fill='%2300AAFF' font-family='serif' font-weight='bold'%3E%E2%82%B3%3C/text%3E%3C/svg%3E");
}

.ryanplugins-cww-icon-solana {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%239945FF'/%3E%3Ctext x='16' y='21' text-anchor='middle' font-size='11' fill='white' font-family='sans-serif' font-weight='bold'%3ESOL%3C/text%3E%3C/svg%3E");
}

/* ── Wallet info block — hidden by default, JS controls visibility ── */
/* Prevents flash of manual panel before wallet-connect.js initialises */
#ryanplugins-cww-payment-form .ryanplugins-cww-wallet-info {
    display: none;
}

/* ── Wallet info block ── */
.ryanplugins-cww-wallet-info {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.ryanplugins-cww-wallet-address-wrap label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #333;
}

.ryanplugins-cww-address-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ryanplugins-cww-address {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.ryanplugins-cww-copy-btn {
    padding: 6px 12px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: background 0.15s;
}

.ryanplugins-cww-copy-btn:hover { background: #005177; }
.ryanplugins-cww-copy-btn.copied { background: #2e7d32; }

/* ── QR Code ── */
.ryanplugins-cww-qr-wrap,
.ryanplugins-cww-block-qr-wrap {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* QR card — white padded container.
 * The canvas inside is always 148x148 (drawn by JS via canvas redraw trick).
 * No overflow:hidden — that kills qrcode.js async rendering. */
.ryanplugins-cww-qr,
.ryanplugins-cww-block-qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #e2e5ef;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    line-height: 0;
}

/* Canvas is injected by JS at exactly 148x148 — CSS just ensures display:block */
.ryanplugins-cww-qr canvas,
.ryanplugins-cww-block-qr canvas {
    display: block;
    border-radius: 4px;
}

.ryanplugins-cww-qr-caption {
    font-size: 11px;
    color: #9ca3af;
    margin: 0;
    letter-spacing: 0.02em;
}

/* ── TX ID field ── */
.ryanplugins-cww-txid-field {
    margin-top: 14px;
}

.ryanplugins-cww-txid-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}

.ryanplugins-cww-txid-field input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
}

.ryanplugins-cww-txid-hint {
    display: block;
    color: #888;
    font-size: 12px;
    margin-top: 4px;
}

/* ── Exchange rate note ── */
.ryanplugins-cww-exchange-note {
    color: #888;
    font-size: 12px;
    margin-top: 10px;
}

/* ── Thank you page ── */
.ryanplugins-cww-thankyou {
    background: #f0f8ff;
    border: 1px solid #b3d9f5;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 20px 0;
}

.ryanplugins-cww-thankyou h2 {
    margin-top: 0;
    font-size: 18px;
    color: #0073aa;
}

.ryanplugins-cww-thankyou-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.ryanplugins-cww-thankyou-table th,
.ryanplugins-cww-thankyou-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #d9e8f5;
    text-align: left;
    font-size: 14px;
}

.ryanplugins-cww-thankyou-table th {
    font-weight: 600;
    color: #555;
    width: 130px;
}

.ryanplugins-cww-no-txid {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 12px;
}

/* ── TX ID update form (My Account) ── */
.ryanplugins-cww-txid-update {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    padding: 18px 20px;
    margin-top: 20px;
}

.ryanplugins-cww-txid-update h2 {
    font-size: 16px;
    margin-top: 0;
}

.ryanplugins-cww-icon-ethereum {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23627EEA'/%3E%3Cpolygon points='16,5 16,14 23,17' fill='white' opacity='0.6'/%3E%3Cpolygon points='16,5 9,17 16,14' fill='white'/%3E%3Cpolygon points='16,18.5 16,27 23,18.5' fill='white' opacity='0.6'/%3E%3Cpolygon points='16,27 9,18.5 16,18.5' fill='white'/%3E%3C/svg%3E");
}
.ryanplugins-cww-icon-bitcoin {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23F7931A'/%3E%3Ctext x='16' y='21' text-anchor='middle' font-size='16' fill='white' font-family='serif' font-weight='bold'%3E%E2%82%BF%3C/text%3E%3C/svg%3E");
}
.ryanplugins-cww-icon-xrp {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%2300AAE4'/%3E%3Cpath d='M22 7h3L19 13.3c-1.7 1.7-4.3 1.7-6 0L7 7h3l4.7 4.7c1 1 2.6 1 3.6 0L22 7z' fill='white'/%3E%3Cpath d='M10 25H7l6.5-6.3c1.7-1.7 4.3-1.7 6 0L26 25h-3l-4.7-4.7c-1-1-2.6-1-3.6 0L10 25z' fill='white'/%3E%3C/svg%3E");
}
.ryanplugins-cww-icon-bnb {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23F3BA2F'/%3E%3Cpath fill='white' d='M12.116 14.404 16 10.52l3.886 3.886 2.26-2.26L16 6l-6.144 6.144 2.26 2.26zM6 16l2.26-2.26L10.52 16l-2.26 2.26L6 16zm6.116 1.596L16 21.48l3.886-3.886 2.26 2.259L16 26l-6.144-6.146 2.26-2.258zM21.48 16l2.26-2.26L26 16l-2.26 2.26L21.48 16zm-3.188-.002L16 13.706l-2.293 2.292L16 18.294l2.292-2.296z'/%3E%3C/svg%3E");
}
.ryanplugins-cww-icon-sui {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%236FBCF0'/%3E%3Ctext x='16' y='21' text-anchor='middle' font-size='11' fill='white' font-family='sans-serif' font-weight='bold'%3ESUI%3C/text%3E%3C/svg%3E");
}
.ryanplugins-cww-icon-near {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%2300C08B'/%3E%3Ctext x='16' y='21' text-anchor='middle' font-size='9' fill='white' font-family='sans-serif' font-weight='bold'%3ENEAR%3C/text%3E%3C/svg%3E");
}
.ryanplugins-cww-icon-usdt {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%2326A17B'/%3E%3Cpath fill='%23fff' d='M17.9 17.4c-.1 0-.7 0-1.9 0-1 0-1.7 0-2 0v-2.6c-.3 0-2.6.2-2.6.9s2.3.9 5.5.9 5.5-.2 5.5-.9-2.2-.9-4.5-.9m0-2.4V12.6h2.7V11H11.3v1.6h2.7v2.4c-2.2.1-3.9.6-3.9 1.2s1.7 1.1 3.9 1.2v3.8h2v-3.8c2.2-.1 3.8-.6 3.8-1.2s-1.7-1.1-3.9-1.2'/%3E%3C/svg%3E");
}
.ryanplugins-cww-icon-usdc {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%232775CA'/%3E%3Cpath fill='%23fff' d='M20 17.6c0-2-1.2-2.7-3.6-3-1.8-.3-2.2-.7-2.2-1.5s.6-1.4 1.8-1.4c1.1 0 1.7.4 2 1.3.1.2.3.4.5.4h1.1c.3 0 .5-.2.5-.5v-.1c-.3-1.5-1.5-2.6-3-2.8V8.5c0-.3-.2-.5-.5-.5H15c-.3 0-.5.2-.5.5V10c-1.8.3-3 1.5-3 3 0 1.9 1.2 2.6 3.5 3 1.7.3 2.3.7 2.3 1.6s-.7 1.5-2 1.5c-1.5 0-2-.6-2.2-1.5-.1-.3-.3-.4-.5-.4h-1.1c-.3 0-.5.2-.5.5v.1c.3 1.6 1.4 2.8 3 3.1v1.5c0 .3.2.5.5.5h1.5c.3 0 .5-.2.5-.5v-1.5c1.8-.3 3.1-1.6 3-3.3z'/%3E%3C/svg%3E");
}

/* ── Amount Due Box ────────────────────────────────────────────── */
.ryanplugins-cww-amount-due-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    border-radius: 10px;
    padding: 16px 18px 12px;
    margin-bottom: 14px;
    color: #fff;
    transition: box-shadow 0.3s;
}

.ryanplugins-cww-amount-due-box.ryanplugins-cww-amount-refreshed {
    box-shadow: 0 0 0 2px #38bdf8;
}

.ryanplugins-cww-amount-due-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ryanplugins-cww-amount-due-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 600;
}

.ryanplugins-cww-amount-due-crypto {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 4px 0 2px;
}

.ryanplugins-cww-amount-due-value {
    font-size: 28px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: -0.01em;
    font-family: 'Courier New', monospace;
    transition: color 0.3s;
}

.ryanplugins-cww-amount-due-symbol {
    font-size: 16px;
    font-weight: 700;
    color: #7dd3fc;
}

.ryanplugins-cww-amount-due-fiat {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ryanplugins-cww-rate-note {
    font-size: 11px;
    color: #64748b;
    background: rgba(255,255,255,0.07);
    padding: 1px 6px;
    border-radius: 3px;
}

.ryanplugins-cww-copy-amount-btn {
    margin-top: 10px;
    align-self: flex-start;
    background: rgba(56,189,248,0.15);
    border: 1px solid rgba(56,189,248,0.35);
    color: #38bdf8;
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.ryanplugins-cww-copy-amount-btn:hover {
    background: rgba(56,189,248,0.28);
    color: #fff;
}

.ryanplugins-cww-copy-amount-btn.copied {
    background: rgba(34,197,94,0.2);
    border-color: rgba(34,197,94,0.4);
    color: #4ade80;
}

.ryanplugins-cww-amount-due-rate-source {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.ryanplugins-cww-rate-source-badge {
    font-size: 10px;
    color: #a3e635;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.ryanplugins-cww-rate-freshness {
    font-size: 10px;
    color: #475569;
}

/* ── No rate warning ───────────────────────────────────────────── */
.ryanplugins-cww-amount-no-rate {
    background: #1c1917 !important;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #a8a29e !important;
}

.ryanplugins-cww-no-rate-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Test Mode Banner (checkout) ───────────────────────────────── */
.ryanplugins-cww-test-mode-banner {
    background: #fefce8;
    border: 1px solid #fde047;
    border-left: 3px solid #eab308;
    color: #854d0e;
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* ── Stablecoin network badge on checkout pill ── */
.ryanplugins-cww-pill-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: 0.03em;
    line-height: 1.4;
}

/* ── Stablecoin rate badge ────────────────────── */
.ryanplugins-cww-rate-source-badge.ryanplugins-cww-rate-stable {
    background: #ecfdf5;
    color: #065f46;
    border-color: #6ee7b7;
}

/* ── Rate lock timer (#7) ─────────────────────── */
.ryanplugins-cww-rate-lock-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
    margin-top: 10px;
    padding: 7px 12px;
    background: #f0f6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
}
.ryanplugins-cww-rate-lock-countdown {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    color: #1d4ed8;
}
.ryanplugins-cww-rate-lock-timer.ryanplugins-cww-rate-lock-urgent {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}
.ryanplugins-cww-rate-lock-timer.ryanplugins-cww-rate-lock-urgent .ryanplugins-cww-rate-lock-countdown {
    color: #c2410c;
    animation: ryanplugins-cww-pulse 1s ease-in-out infinite;
}
@keyframes ryanplugins-cww-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* ── Thank-you status widget (#8) ────────────────── */
.ryanplugins-cww-status-widget {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    background: #f0f6ff;
    font-size: 14px;
}
.ryanplugins-cww-status-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ryanplugins-cww-status-pending {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-weight: 500;
}
.ryanplugins-cww-status-hint {
    font-size: 11px;
    color: #888;
}
.ryanplugins-cww-status-confirmed {
    color: #15803d;
    font-weight: 700;
    font-size: 15px;
}
.ryanplugins-cww-status-confirmed-state {
    background: #f0fdf4;
    border-color: #86efac;
}
.ryanplugins-cww-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #bfdbfe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: ryanplugins-cww-spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes ryanplugins-cww-spin {
    to { transform: rotate(360deg); }
}
