/* ================= OVERLAY ================= */
.wallet-overlay,
.credential-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ================= CONTAINER ================= */
.wallet-container,
.credential-container {
    width: 420px;
    max-height: 85vh;
    background: #1e2732;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalFade .25s ease;
    overflow-x: hidden;
}

/* ================= HEADER ================= */
.wallet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    background: #212f3b;
    border-bottom: 1px solid #2c3a47;
}

.wallet-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.wallet-header button {
    background: none;
    border: none;
    color: #9aa4af;
    font-size: 18px;
    cursor: pointer;
}

/* ================= BODY ================= */
.wallet-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    overflow-x: hidden;
    scrollbar-width: none;
}

/* Chrome, Safari, Edge */
.wallet-body::-webkit-scrollbar {
    display: none;
}

/* ================= GRID ================= */
.wallet-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    padding: 0;
    margin: 0;
    width: 100%;
}

.wallet-grid li {
    display: flex;
}

/* ================= WALLET ITEM ================= */
.wallet-item {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform .12s ease;
}

.wallet-item:hover {
    transform: scale(1.04);
}

.wallet-item:active {
    transform: scale(0.96);
}

.wallet-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #121b24;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-item span {
    font-size: 13px;
    text-align: center;
    word-break: break-word;
}

.wallet-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 16px;
}

/* ================= FOOTER ================= */
.wallet-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #212f3b;
    border-top: 1px solid #2c3a47;
}

.wallet-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ton-logo {
    width: 22px;
    height: 22px;
    background-image: var(--image-url-connect-ton);
    background-size: contain;
    background-repeat: no-repeat;
}

.wallet-footer-help {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2c3a47;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ================= CREDENTIAL MODAL ================= */
.tab-buttons {
    display: flex;
    border-bottom: 1px solid #2c3a47;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #9aa4af;
    cursor: pointer;
    font-size: 14px;
}

.tab-btn.active {
    background: #293a4d;
    color: #fff;
}

.tab-content {
    padding: 16px;
    flex: 1;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

textarea,
input {
    width: 100%;
    background: #111a23;
    border: 1px solid #2c3a47;
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    resize: none;
}

.btn-connect {
    margin: 16px;
    padding: 12px;
    background: #3ea6ff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    color: #ffffff;
    width: calc(100% - 32px);
}

/* ================= ANIMATION ================= */
@keyframes modalFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 500px) {

    .wallet-container,
    .credential-container {
        width: 95%;
    }

    .wallet-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.text-info{
    font-size: 12px;
    color: #0dcaf0;
    margin-top: 8px;
}