/* Universal Wallet Connector Styles */

/* Wallet Modal Overlay */
.wallet-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

/* Wallet Modal */
.wallet-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Wallet Modal Header */
.wallet-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.wallet-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.wallet-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.wallet-modal-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Wallet Modal Body */
.wallet-modal-body {
    padding: 1.5rem;
}

.wallet-modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Wallet Options */
.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.wallet-option:hover {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.wallet-option:active {
    transform: translateY(0);
}

.wallet-icon {
    font-size: 1.5rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wallet-name {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.wallet-status {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-weight: 400;
}

/* Wallet Install Options */
.wallet-install-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wallet-install-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.wallet-install-link:hover {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.wallet-install-link span {
    font-size: 1.25rem;
}

/* Wallet Modal Footer */
.wallet-modal-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.wallet-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

/* Connected Wallet Info */
.wallet-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    min-width: 0;
}

.wallet-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.wallet-badge .wallet-icon {
    font-size: 1rem;
    width: 1.5rem;
    height: 1.5rem;
}

.wallet-badge .wallet-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.wallet-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.wallet-address {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.wallet-balance {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-wallet-options {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-wallet-options:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Wallet Options Dropdown */
.wallet-options-dropdown {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 1001;
}

.wallet-dropdown {
    display: flex;
    flex-direction: column;
}

.wallet-dropdown button {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.wallet-dropdown button:last-child {
    border-bottom: none;
}

.wallet-dropdown button:hover {
    background: var(--bg-tertiary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wallet-modal {
        max-width: 95%;
        margin: 1rem;
    }
    
    .wallet-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .wallet-badge {
        width: 100%;
        justify-content: space-between;
    }
    
    .wallet-details {
        width: 100%;
    }
}

/* Force desktop layout improvements */
@media (min-width: 769px) {
    .wallet-info {
        max-width: none !important;
        min-width: 300px !important;
    }
    
    .wallet-status {
        min-width: 250px !important;
    }
}