/* Universal Wallet Modal - Supports 300+ Wallets */
.universal-wallet-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.universal-wallet-modal.active {
    opacity: 1;
    visibility: visible;
}

.universal-wallet-container {
    background: #ffffff;
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.universal-wallet-header {
    padding: 24px;
    border-bottom: 1px solid #e7e7e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.universal-wallet-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.universal-wallet-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.universal-wallet-close:hover {
    background: #f5f5f5;
}

.universal-wallet-search {
    padding: 16px 24px;
    border-bottom: 1px solid #e7e7e7;
}

.universal-wallet-search input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.universal-wallet-search input:focus {
    border-color: #3b99fc;
}

.universal-wallet-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.wallet-option-universal {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 8px;
    position: relative;
}

.wallet-option-universal:hover {
    background: #f8f9fa;
}

.wallet-option-universal.loading {
    opacity: 0.6;
    pointer-events: none;
}

.wallet-icon-universal {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-right: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.wallet-info-universal {
    flex: 1;
}

.wallet-name-universal {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    margin: 0 0 4px 0;
}

.wallet-description-universal {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.wallet-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.wallet-badge.installed {
    background: #e8f5e9;
    color: #2e7d32;
}

.wallet-badge.mobile {
    background: #fff3e0;
    color: #ef6c00;
}

.wallet-loading-spinner {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b99fc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.universal-wallet-footer {
    padding: 16px 24px;
    border-top: 1px solid #e7e7e7;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.universal-wallet-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.universal-wallet-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Scrollbar styling */
.universal-wallet-list::-webkit-scrollbar {
    width: 6px;
}

.universal-wallet-list::-webkit-scrollbar-track {
    background: transparent;
}

.universal-wallet-list::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 10px;
}

.universal-wallet-list::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .universal-wallet-container {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .universal-wallet-header {
        padding: 20px;
    }

    .wallet-option-universal {
        padding: 16px;
    }

    .wallet-icon-universal {
        width: 44px;
        height: 44px;
    }
}

/* Loading state for entire modal */
.universal-wallet-modal.loading .universal-wallet-list {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.modal-loader {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b99fc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
