/* Universal wallet modal styles */
.wallet-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
}

.wallet-modal-container {
    width: min(500px, 92vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1rem;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.4);
    overflow: hidden;
    animation: fadeInScale 0.25s ease;
}

.wallet-modal-header,
.wallet-modal-footer {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.wallet-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wallet-modal-header h2 {
    font-size: 1.5rem;
    color: #ffffff;
}

.wallet-modal-close {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 1.75rem;
    cursor: pointer;
}

.wallet-modal-search {
    padding: 0 1.5rem 1rem;
}

.wallet-search-input {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: #111827;
    color: #e2e8f0;
    padding: 0.95rem 1rem;
    font-size: 1rem;
}

.wallet-modal-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
}

.wallet-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.wallet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: #111827;
    color: #e2e8f0;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.wallet-item:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.35);
}

.wallet-icon {
    font-size: 1.25rem;
}

.wallet-name {
    flex: 1;
    text-align: left;
    font-weight: 600;
}

.wallet-arrow {
    font-size: 1.15rem;
}

.wallet-qr-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.12);
    min-height: 320px;
}

.wallet-qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.qr-description {
    color: #cbd5e1;
    max-width: 340px;
}

.wallet-back-btn {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.wallet-modal-note {
    color: #94a3b8;
    font-size: 0.95rem;
}

.wallet-modal-note a {
    color: var(--primary);
}

.toast-container {
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 10000;
    display: grid;
    gap: 0.75rem;
}

.toast {
    min-width: 320px;
    max-width: 420px;
    padding: 1rem 1rem 1rem 0.9rem;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
    border-radius: 1rem;
    opacity: 0;
    transform: translateY(-18px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    color: #e2e8f0;
    line-height: 1.4;
}

.toast-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-size: 1.05rem;
    cursor: pointer;
}

.global-loader {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.9);
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.975);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.spinner {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 4px solid rgba(148, 163, 184, 0.2);
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

.loader-message {
    color: #e2e8f0;
    font-size: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(-14px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
