/* Wallet pill (header) and minimal wallet modal */
/* Wallet under username (replaces email line in user menu header) – glossy */
.wallet-under-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    cursor: pointer;
    text-align: left;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    /* Glossy teal/cyan tint */
    background: linear-gradient(145deg, rgba(0, 180, 200, 0.28) 0%, rgba(0, 140, 160, 0.18) 50%, rgba(0, 160, 180, 0.22) 100%);
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.3), inset 0 -1px 0 0 rgba(0,0,0,0.15);
}
.wallet-under-name::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
    pointer-events: none;
    border-radius: 8px 8px 0 0;
}
.wallet-under-name i,
.wallet-under-name .wallet-pill-label {
    position: relative;
    z-index: 1;
}
.wallet-under-name:hover {
    background: linear-gradient(145deg, rgba(0, 200, 220, 0.35) 0%, rgba(0, 160, 180, 0.25) 50%, rgba(0, 180, 200, 0.3) 100%);
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.4), inset 0 -1px 0 0 rgba(0,0,0,0.2);
}
.wallet-under-name:hover::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
}

/* Wallet as user-menu item (legacy/full-width) */
.wallet-menu-item {
    width: 100%;
    border: none;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.wallet-menu-item i,
.wallet-menu-item .wallet-pill-label {
    position: relative;
    z-index: 1;
}

.wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-right: 12px;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 8px;
    color: var(--text-primary, #fff);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.wallet-pill:hover {
    background: var(--bg-tertiary, #2a2a2a);
    border-color: var(--primary-color, #00d4ff);
}
.wallet-pill i {
    opacity: 0.9;
}
.wallet-modal {
    position: fixed;
    inset: 0;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.wallet-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}
.wallet-modal-content {
    position: relative;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,0.5));
}
.wallet-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.1));
}
.wallet-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #fff);
}
.wallet-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-secondary, rgba(255,255,255,0.8));
    cursor: pointer;
    padding: 0 4px;
}
.wallet-modal-close:hover {
    color: var(--text-primary, #fff);
}
.wallet-modal-body {
    padding: 20px;
}
.wallet-balance-big {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color, #00d4ff);
    margin-bottom: 4px;
}
.wallet-available-label {
    font-size: 13px;
    color: var(--text-secondary, rgba(255,255,255,0.8));
    margin-bottom: 4px;
}
.wallet-balance-detail {
    font-size: 12px;
    color: var(--text-secondary, rgba(255,255,255,0.7));
    margin-bottom: 16px;
}
.wallet-locked {
    font-size: 13px;
    color: var(--text-secondary, rgba(255,255,255,0.8));
    margin-bottom: 20px;
}
.wallet-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wallet-topup-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, rgba(255,255,255,0.85));
    margin: 0 0 6px 0;
}
.wallet-topup-amount-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    background-color: #1a1a24;
    border: 1px solid var(--border-color, rgba(255,255,255,0.15));
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='%23fff'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    color-scheme: dark;
}
.wallet-topup-amount-select option {
    background-color: #1a1a24;
    color: #fff;
}
.wallet-topup-amount-select optgroup {
    background-color: #1a1a24;
    color: #fff;
}
.wallet-topup-amount-select:hover {
    border-color: rgba(255,255,255,0.25);
}
.wallet-topup-amount-select:focus {
    outline: none;
    border-color: var(--primary-color, #00d4ff);
}
.wallet-modal-actions .btn-primary {
    width: 100%;
}
.wallet-modal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
}
.wallet-links-sep {
    color: var(--text-secondary, rgba(255,255,255,0.5));
    user-select: none;
}
.wallet-history-label {
    color: var(--text-secondary, rgba(255,255,255,0.8));
}
.wallet-view-spending {
    display: inline-block;
    text-align: center;
    color: var(--primary-color, #00d4ff);
    font-size: 14px;
    text-decoration: none;
}
.wallet-view-spending:hover {
    text-decoration: underline;
}
.wallet-ledger-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.1));
}
.wallet-ledger-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--text-secondary, rgba(255,255,255,0.8));
}
.wallet-ledger-empty {
    margin: 0;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-secondary, rgba(255,255,255,0.6));
}
.wallet-ledger-view-all {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--primary-color, #00d4ff);
    text-decoration: none;
}
.wallet-ledger-view-all:hover {
    text-decoration: underline;
}
.wallet-ledger-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: var(--text-primary, #fff);
}
.wallet-ledger-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
}
.wallet-ledger-list li:last-child {
    border-bottom: none;
}
.wallet-ledger-list .wallet-ledger-desc {
    flex: 1;
    min-width: 0;
    margin-right: 12px;
}
.wallet-ledger-list .amount-positive { color: #10b981; }
.wallet-ledger-list .amount-negative { color: #ef4444; }
