.translate-wrapper {
    position: relative;
}

.translate-btn {
    /* background: #5fb611; */
    background: #337ab7;
    color: #fff;
    padding: 5px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: .3s;
}

.translate-btn:hover {
    /* background: #519c0fff; */
    background: #1e5c92;
}

.translate-popup {
    position: absolute;
    top: 45px;
    right: 0;
    width: 330px;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
    /* border-radius: 14px; */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 15px;
    display: none;
    z-index: 1000;
}

/* Flag grid */
.flags-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.flag-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: .2s;
    background: #f7f7f7;
}

.flag-item:hover {
    background: #e6e6e6;
}

.flag-item img {
    width: 32px;
    height: 22px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 6px;
}

.flag-label {
    font-size: 12px;
    text-align: center;
}

/* Hide Google default junk */
.goog-te-banner-frame,
.goog-te-gadget span,
.goog-te-gadget img,
.goog-logo-link {
    display: none !important;
}

body {
    top: 0 !important;
}

.skiptranslate {
    display: none !important;
}



.translate-popup::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    /* border-radius: 10px; */
    background-color: #F5F5F5;
}

.translate-popup::-webkit-scrollbar {
    width: 6px;
    background-color: #ffffffff;
}

.translate-popup::-webkit-scrollbar-thumb {
    /* border-radius: 10px; */
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
    /* background-color: #5fb611; */
    background-color: #337ab7;
}

/* Mobile Polish */
@media (max-width: 450px) {
    .translate-popup {
        width: 300px;
        right: -50px;
    }

    .flags-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 350px) {
    .translate-popup {
        width: calc(100vw - 30px);
        right: -20px;
        padding: 10px;
    }

    .flag-item {
        padding: 8px 5px;
    }
}