/* =============================================
   CWW — Wallet Connect Styles
   Dark-glass aesthetic: deep navy + electric accents
   ============================================= */

/* ── Mode selector ─────────────────────────────────────────────── */
#ryanplugins-cww-mode-selector {
    margin-bottom: 16px;
}

.ryanplugins-cww-mode-label {
    font-size: 13px;
    color: #444;
    margin-bottom: 8px;
}

.ryanplugins-cww-mode-options {
    display: flex;
    gap: 10px;
}

.ryanplugins-cww-mode-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 10px;
    border: 2px solid #dde1e9;
    border-radius: 10px;
    background: #f7f8fb;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    text-align: center;
    line-height: 1.3;
}

.ryanplugins-cww-mode-btn:hover {
    border-color: #7c8cf8;
    background: #f0f2ff;
}

.ryanplugins-cww-mode-btn.active {
    border-color: #4f5fe8;
    background: #eef0ff;
    box-shadow: 0 2px 10px rgba(79,95,232,0.15);
}

.ryanplugins-cww-mode-icon {
    font-size: 22px;
    line-height: 1;
}

.ryanplugins-cww-mode-title {
    font-weight: 700;
    font-size: 13px;
    color: #1a1d2e;
}

.ryanplugins-cww-mode-desc {
    font-size: 11px;
    color: #7a7f9a;
}

/* ── Wallet grid ───────────────────────────────────────────────── */
.ryanplugins-cww-wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.ryanplugins-cww-wallet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px 10px;
    border: 2px solid #e2e5ef;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
    position: relative;
}

.ryanplugins-cww-wallet-item:hover {
    border-color: #4f5fe8;
    background: #f5f6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(79,95,232,0.12);
}

.ryanplugins-cww-wallet-unavailable {
    opacity: 0.55;
    filter: grayscale(0.5);
}

.ryanplugins-cww-wallet-unavailable:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    transform: none;
    box-shadow: none;
}

.ryanplugins-cww-wallet-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
}

.ryanplugins-cww-wallet-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a1d2e;
}

.ryanplugins-cww-wallet-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ryanplugins-cww-wallet-badge.detected {
    background: #d1fae5;
    color: #065f46;
}

.ryanplugins-cww-wallet-badge.not-detected {
    background: #fef3c7;
    color: #92400e;
}

/* ── Status messages ───────────────────────────────────────────── */
#ryanplugins-cww-connect-status {
    margin: 8px 0;
}

.ryanplugins-cww-status {
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ryanplugins-cww-status a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.ryanplugins-cww-status-loading  { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.ryanplugins-cww-status-success  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.ryanplugins-cww-status-error    { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.ryanplugins-cww-status-warning  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ── Connected panel ───────────────────────────────────────────── */
.ryanplugins-cww-connected-panel {
    background: #f8f9fe;
    border: 1px solid #e0e4f5;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 10px;
    font-size: 13px;
}

.ryanplugins-cww-connected-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    margin-bottom: 8px;
}

.ryanplugins-cww-connected-label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
    flex-shrink: 0;
}

.ryanplugins-cww-connected-addr {
    background: #fff;
    border: 1px solid #dde0ef;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    word-break: break-all;
    flex: 1;
}

/* ── Amount badge ──────────────────────────────────────────────── */
.ryanplugins-cww-amount-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a1d2e 0%, #2d3163 100%);
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 10px 0;
}

.ryanplugins-cww-amount-label {
    font-size: 12px;
    opacity: 0.75;
}

.ryanplugins-cww-amount-value {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #a5b4fc;
}

/* ── Confirmation method buttons ───────────────────────────────── */
.ryanplugins-cww-confirm-methods {
    margin-top: 12px;
}

.ryanplugins-cww-confirm-label {
    margin-bottom: 8px;
    color: #333;
}

.ryanplugins-cww-confirm-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ryanplugins-cww-confirm-btn {
    flex: 1;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 12px 10px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    line-height: 1.3;
    text-align: center;
}

.ryanplugins-cww-confirm-btn small {
    font-weight: 400;
    font-size: 11px;
    opacity: 0.8;
    display: block;
}

.ryanplugins-cww-confirm-btn .ryanplugins-cww-btn-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.ryanplugins-cww-sign-btn {
    background: #4f5fe8;
    color: #fff;
    border-color: #4f5fe8;
}

.ryanplugins-cww-sign-btn:hover:not(:disabled) {
    background: #3a4bd4;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(79,95,232,0.3);
}

.ryanplugins-cww-sign-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ryanplugins-cww-manual-confirm-btn {
    background: #f0f2ff;
    color: #3730a3;
    border-color: #c7d0fc;
}

.ryanplugins-cww-manual-confirm-btn:hover {
    background: #e0e4ff;
    border-color: #a5b4fc;
}

/* ── TX hash input ─────────────────────────────────────────────── */
#ryanplugins-cww-txhash-input-area {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7f0;
}

#ryanplugins-cww-txhash-input-area label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #333;
}

.ryanplugins-cww-txinput-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ryanplugins-cww-txinput-row input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #c5cae0;
    border-radius: 6px;
    font-size: 12px;
    font-family: monospace;
}

.ryanplugins-cww-submit-txid {
    padding: 8px 16px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.ryanplugins-cww-submit-txid:hover { background: #047857; }
.ryanplugins-cww-submit-txid:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── TX success box ────────────────────────────────────────────── */
.ryanplugins-cww-tx-success-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 12px;
    font-size: 13px;
    color: #14532d;
}

.ryanplugins-cww-tx-success-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.ryanplugins-cww-txhash-display {
    display: inline-block;
    background: #dcfce7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin: 4px 0;
}

.ryanplugins-cww-place-order-hint {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #854d0e;
    background: #fefce8;
    border: 1px solid #fde047;
    border-radius: 6px;
    padding: 5px 10px;
}

.ryanplugins-cww-explorer-link {
    color: #15803d;
    font-weight: 600;
    text-decoration: underline;
    font-size: 12px;
}

/* ── Disconnect button ─────────────────────────────────────────── */
.ryanplugins-cww-disconnect-btn {
    margin-top: 10px;
    background: none;
    border: 1px solid #e5e7f0;
    border-radius: 5px;
    color: #9ca3af;
    font-size: 11px;
    padding: 4px 10px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.ryanplugins-cww-disconnect-btn:hover {
    color: #ef4444;
    border-color: #fca5a5;
}

/* ── Responsive tweaks ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .ryanplugins-cww-mode-options,
    .ryanplugins-cww-confirm-options {
        flex-direction: column;
    }
    .ryanplugins-cww-wallet-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Manual-only notice (BTC / XRP) ───────────────────────────── */
.ryanplugins-cww-manual-only-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #78350f;
}

.ryanplugins-cww-manual-only-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

/* ── Updated wallet amount badge ───────────────────────────────── */
.ryanplugins-cww-wallet-amount-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.7;
    margin-bottom: 4px;
}

.ryanplugins-cww-wallet-amount-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.ryanplugins-cww-amount-sym {
    font-size: 14px;
    font-weight: 700;
    color: #a5b4fc;
}

.ryanplugins-cww-wallet-amount-fiat {
    font-size: 12px;
    opacity: 0.65;
    margin-top: 3px;
}

.ryanplugins-cww-amount-badge-warn {
    background: linear-gradient(135deg, #451a03, #78350f) !important;
    font-size: 12px;
    color: #fde68a !important;
    text-align: center;
}

/* ── Testnet badge (wallet-connect panel) ──────────────────────── */
.ryanplugins-cww-testnet-badge {
    background: #fefce8;
    border: 1px solid #fde047;
    border-left: 3px solid #eab308;
    color: #854d0e;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 8px;
}
