/* ============================================================
   Quantum Bubble Chat — Wallet UI
   Copyright (c) 2026 Derek King / Qubble Labs LLC.
   ============================================================ */

/* Wallet button in header */
.hbtn.wallet { border-color: rgba(245, 158, 11, 0.4); color: #f59e0b; font-size: 13px; }
.hbtn.wallet:hover { background: rgba(245, 158, 11, 0.15); }
.hbtn.wallet.connected { border-color: rgba(52, 211, 153, 0.5); color: var(--color-success); }

/* Modal overlay */
.wallet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.wallet-overlay.open { display: flex; }

/* Modal card */
.wallet-modal {
    background: rgba(18, 18, 31, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border, rgba(123,47,247,0.15));
    border-radius: 20px;
    padding: 28px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 40px rgba(123, 47, 247, 0.1), 0 20px 60px rgba(0,0,0,0.5);
    color: #e8e8f0;
    font-family: 'Inter', sans-serif;
}

.wallet-modal h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #7b2ff7, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Wallet option buttons */
.wallet-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(123, 47, 247, 0.15);
    border-radius: 12px;
    background: rgba(10, 10, 15, 0.5);
    color: #e8e8f0;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 8px;
    font-family: inherit;
    font-size: 0.9rem;
}
.wallet-option:hover {
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.06);
    transform: translateY(-1px);
}
.wallet-option .wo-icon { font-size: 1.4rem; }
.wallet-option .wo-name { font-weight: 600; }
.wallet-option .wo-type { font-size: 0.7rem; color: #8888a8; margin-left: auto; text-transform: uppercase; letter-spacing: 1px; }
.wallet-option.disabled { opacity: 0.4; cursor: not-allowed; }
.wallet-option.disabled:hover { border-color: rgba(123,47,247,0.15); background: rgba(10,10,15,0.5); transform: none; }

/* Connected state in modal */
.wallet-connected-info {
    text-align: center;
    padding: 16px 0;
}
.wallet-connected-info .wci-address {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.08);
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    margin: 10px 0;
    word-break: break-all;
}
.wallet-connected-info .wci-chain {
    font-size: 0.75rem;
    color: #34d399;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Send crypto modal */
.send-modal-row {
    margin-bottom: 14px;
}
.send-modal-row label {
    display: block;
    font-size: 0.7rem;
    color: #8888a8;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.send-modal-row input,
.send-modal-row select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(123, 47, 247, 0.2);
    background: rgba(10, 10, 15, 0.6);
    color: #e8e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    outline: none;
    transition: 0.2s;
}
.send-modal-row input:focus,
.send-modal-row select:focus {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.08);
}
.send-modal-row select { cursor: pointer; color: #00d4ff; }

/* Action buttons */
.wallet-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 8px;
}
.wallet-btn.primary { background: linear-gradient(135deg, #7b2ff7, #00d4ff); color: #fff; }
.wallet-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 0 20px rgba(123,47,247,0.3); }
.wallet-btn.danger { background: transparent; border: 1px solid rgba(244,114,182,0.3); color: #f472b6; }
.wallet-btn.danger:hover { background: rgba(244,114,182,0.1); }
.wallet-btn.secondary { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: #8888a8; }
.wallet-btn.secondary:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

/* Transfer bubble */
.transfer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    margin-top: 6px;
    font-family: 'JetBrains Mono', monospace;
}
.transfer-icon { font-size: 1.4rem; }
.transfer-details { flex: 1; }
.transfer-amount { font-size: 1rem; font-weight: 700; color: #f59e0b; }
.transfer-chain { font-size: 0.65rem; color: #8888a8; text-transform: uppercase; letter-spacing: 1px; }
.transfer-status { font-size: 0.7rem; margin-top: 4px; }
.transfer-status[data-status="pending"] { color: #f59e0b; animation: tpulse 1.5s infinite; }
.transfer-status[data-status="confirmed"] { color: #34d399; }
.transfer-status[data-status="failed"] { color: #f472b6; }
@keyframes tpulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.transfer-tx-link { font-size: 0.65rem; color: #00d4ff; text-decoration: none; opacity: 0.7; }
.transfer-tx-link:hover { opacity: 1; text-decoration: underline; }

/* Send crypto button next to input */
.send-crypto-btn {
    background: transparent;
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 0;  /* hide text, use SVG background */
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='1' x2='12' y2='23'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}
.send-crypto-btn:hover { background-color: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.5); }
.send-crypto-btn.disabled { opacity: 0.3; cursor: not-allowed; }
/* style.css `#chat-form button { background: gradient }` (ID+tag) outspecifies
   the plain `.send-crypto-btn` (class only) and was wiping the SVG icon to a
   blank gradient square. Restore the icon at higher specificity (ID+class+tag). */
#chat-form button.send-crypto-btn {
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='1' x2='12' y2='23'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E") no-repeat center / 20px 20px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 10px;
    font-size: 0;
}
#chat-form button.send-crypto-btn:hover { background-color: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.5); }

/* Wallet address pills in chat */
.wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    color: #f59e0b;
}

/* Fee estimate */
.fee-estimate {
    font-size: 0.7rem;
    color: #8888a8;
    text-align: right;
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
}
