/* wallet-modal.css - Liquid Glass Design */

/* Modal Overlay - 80% Dark */
.wallet-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.80);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wallet-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container - Bright Liquid Glass */
.wallet-modal {
    background: rgba(30, 32, 36, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4),
                0 4px 16px rgba(0, 0, 0, 0.25);
    position: relative;
}

/* Glass border effect - brighter on top */
.wallet-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 30%,
        rgba(255, 255, 255, 0.05) 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

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

/* Modal Header */
.wallet-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.wallet-modal-close {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #8b9bb4;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.15s ease;
    position: relative;
}

/* Button convex effect */
.wallet-modal-close::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 100%);
    pointer-events: none;
}

.wallet-modal-close:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

/* Modal Content */
.wallet-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.wallet-search {
    margin-bottom: 1rem;
}

.wallet-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border-radius: 12px;
    transition: all 0.15s ease;
}

.wallet-search-input:focus {
    outline: none;
    border-color: #00a8ff;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.15);
}

.wallet-search-input::placeholder {
    color: #3d4452;
}

.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Wallet Item - Glass Button */
.wallet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-align: left;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Convex effect for buttons */
.wallet-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
    pointer-events: none;
}

.wallet-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 168, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

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

.wallet-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wallet-icon {
    font-size: 2rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.wallet-icon-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 12px;
}

.wallet-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

/* Green Dot for Detected Wallets */
.wallet-status-dot {
    width: 12px;
    height: 12px;
    background: #4ade94;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(74, 222, 148, 0.2);
    animation: pulseGreen 2s ease infinite;
}

@keyframes pulseGreen {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(74, 222, 148, 0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(74, 222, 148, 0.1);
    }
}

.wallet-item.wallet-detected {
    border-color: rgba(74, 222, 148, 0.3);
}

.wallet-item.wallet-detected:hover {
    border-color: #4ade94;
    background: rgba(74, 222, 148, 0.05);
}

/* Modal Footer */
.wallet-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.wallet-modal-footer p {
    margin: 0;
    font-size: 0.875rem;
    color: #8b9bb4;
}

.wallet-modal-footer a {
    color: #00a8ff;
    text-decoration: none;
    font-weight: 600;
}

.wallet-modal-footer a:hover {
    text-decoration: underline;
}

/* Scrollbar Styling */
.wallet-modal-content::-webkit-scrollbar {
    width: 6px;
}

.wallet-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.wallet-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.wallet-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wallet-modal {
        width: 95%;
        max-height: 80vh;
        border-radius: 20px;
    }
    
    .wallet-modal-header {
        padding: 1.25rem 1.5rem;
    }
    
    .wallet-modal-header h2 {
        font-size: 1.25rem;
    }
    
    .wallet-modal-content {
        padding: 1rem;
    }
    
    .wallet-list {
        gap: 0.625rem;
    }
    
    .wallet-item {
        padding: 0.875rem 1rem;
        border-radius: 14px;
    }
    
    .wallet-icon {
        font-size: 1.75rem;
        width: 40px;
        height: 40px;
    }
    
    .wallet-name {
        font-size: 0.9375rem;
    }
    
    .wallet-modal-footer {
        padding: 1.25rem 1.5rem;
    }
}
