
body {
    top: 0px !important;
    min-height: 0px !important;
}

body > .skiptranslate {
    display: none !important;
}

.goog-logo-link {
    display: none !important;
}

.goog-te-gadget {
    color: transparent !important;
}

.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

a[href="https://translate.google.com"] {
    display: none !important;
}

/* Modern Google Translate widget */
#google_translate_element {
    display: inline-flex !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 10px 12px;
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 240, 240, 0.8);
}

#google_translate_element:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Remove default widget borders */
#google_translate_element .goog-te-gadget {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
}

/* Style the language dropdown */
#google_translate_element .goog-te-combo {
    margin: 0 !important;
    padding: 10px 38px 10px 14px !important;
    border: 1px solid rgba(224, 224, 224, 0.8) !important;
    border-radius: 12px !important;
    background: rgba(249, 249, 249, 0.8) !important;
    height: auto !important;
    min-height: 38px !important;
    line-height: 1.5 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333333 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: url('/app/Plugin/GoogleTranslate/View/Icon.png') !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px 16px !important;
    transition: all 0.3s ease !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04) !important;
}

/* Hover and focus states */
#google_translate_element .goog-te-combo:hover {
    border-color: rgba(192, 192, 192, 0.9) !important;
    background-color: #ffffff !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06) !important;
}

#google_translate_element .goog-te-combo:focus {
    outline: none !important;
    border-color: #4285f4 !important;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.25) !important;
    background-color: #ffffff !important;
}

/* Toggle translation button */
#translate_toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    background-color: rgba(249, 249, 249, 0.8);
    border: 1px solid rgba(224, 224, 224, 0.8);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    height: 38px;
    width: 38px;
    box-sizing: border-box;
}

#translate_toggle:hover {
    background-color: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

#translate_toggle.active {
    background-color: #4285f4;
    border-color: #4285f4;
    box-shadow: 0 3px 8px rgba(66, 133, 244, 0.3);
}

#translate_toggle.active svg {
    fill: #ffffff;
}

#translate_toggle svg {
    width: 18px;
    height: 18px;
    fill: #5f6368;
    transition: fill 0.3s ease;
}

/* Pulse animation for active toggle */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(66, 133, 244, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0);
    }
}

#translate_toggle.active {
    animation: pulse 2s infinite;
}

/* Mobile optimization */
@media (max-width: 768px) {
    #google_translate_element {
        padding: 8px 10px;
        border-radius: 14px;
    }
    
    #google_translate_element .goog-te-combo {
        padding: 8px 32px 8px 12px !important;
        font-size: 13px !important;
        min-height: 34px !important;
        border-radius: 10px !important;
    }
    
    #translate_toggle {
        padding: 8px;
        height: 34px;
        width: 34px;
        border-radius: 10px;
    }
    
    #translate_toggle svg {
        width: 16px;
        height: 16px;
    }
}