/* Popup Overlay (Background behind the modal) */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.show {
    display: flex; /* Make the modal visible when active */
    opacity: 1;
    visibility: visible;
}

/* Popup Content (Make it scrollable) */
.popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    max-height: 80vh; /* Limit the height of the popup */
    overflow-y: auto; /* Enable vertical scrolling if content exceeds max-height */
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.close-btn:hover {
    color: #d9534f; /* Red color on hover */
}

/* Header of the Modal */
.popup-content h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

/* Search Bar Styling */
.wallet-search {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
}

.wallet-search:focus {
    border-color: #007bff; /* Blue border on focus */
}

/* Wallet Grid (Responsive Grid Layout) */
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 wallets per row on desktop */
    gap: 20px;
    margin-top: 20px;
}

/* Individual Wallet Item Styling */
.wallet {
    display: flex;
    flex-direction: column; /* Stack icon above name */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    visibility: visible; /* Wallet is visible by default */
}

/* Hover Effects for Wallet */
.wallet:hover {
    transform: scale(1.05); /* Slightly enlarges the wallet on hover */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Adds a shadow effect */
}

/* Wallet Image */
.wallet img {
    width: 40px; /* Reduced Icon width */
    height: 40px; /* Reduced Icon height */
    margin-bottom: 8px; /* Reduced space between icon and name */
    object-fit: contain; /* Ensures the logo retains aspect ratio */
    transition: opacity 0.3s ease;
}

/* Wallet Name */
.wallet p {
    margin-top: 5px; /* Slight space between icon and name */
    font-weight: bold;
    color: #333;
    font-size: 12px; /* Smaller text size */
}

/* Remove Text Decoration from Links */
.wallet a {
    text-decoration: none; /* Removes the underline */
    color: inherit; /* Inherit text color from parent */
}

/* Hover Effect for Link */
.wallet a:hover img {
    opacity: 0.8; /* Slightly fade the logo when hovered */
}

/* Responsive Styles (for smaller screens) */
@media (max-width: 768px) {
    .wallet-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 wallets per row on mobile */
    }

    /* Flex Layout for Mobile (Icon on left, Name on right) */
    .wallet {
        flex-direction: column; /* Stack icon above name */
        justify-content: center; /* Center vertically */
        align-items: center; /* Center horizontally */
    }

    .wallet img {
        width: 40px; /* Icon size for mobile */
        height: 40px; /* Icon size for mobile */
    }

    .wallet p {
        font-size: 12px; /* Smaller font size on mobile */
        margin: 0; /* Remove extra margin for cleaner alignment */
    }

    /* Search Bar Styling */
    .wallet-search {
        width: 100%;
        padding: 12px;
        margin-bottom: 20px;
        font-size: 16px;
        border-radius: 8px;
        border: 1px solid #ddd;
        outline: none;
    }

    .popup-content {
        width: 90%;
    }
}

/* Add a smooth transition effect to the modal popup */
.popup-overlay {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
