/*--------------------------------------------------------------
# Language Translator (Google Translate)
# Scoped to .dg-translate so it cannot affect existing components.
--------------------------------------------------------------*/

/* Hidden host for the Google widget. Kept off-screen rather than
   display:none so the widget still initialises correctly. */
#dg-translate-host {
    position: absolute;
    top: -9999px;
    left: 0;
    width: 320px;
    height: 80px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Suppress the Google top banner so it cannot push the sticky header down. */
body {
    top: 0 !important;
}

iframe.skiptranslate,
.skiptranslate iframe {
    display: none !important;
}

#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

/* Trigger — inherits the nav link styling, only spacing added. */
.dg-translate > a i.dg-translate__icon {
    margin-left: 0;
    margin-inline-end: 6px;
}

.dg-translate__label {
    text-transform: uppercase;
}

/*-- Dropdown panel --------------------------------------------
   Desktop only (.main-menu). The meanmenu mobile clone lives under
   .mean-nav and is deliberately left as a plain vertical list. --*/
.header-main .main-menu ul li.dg-translate .submenu {
    inset-inline-start: auto;
    inset-inline-end: 0;
    width: 760px;
    min-width: 0;
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: start;
    padding: 8px;
    gap: 0 4px;
}

@media (max-width: 1399px) {
    .header-main .main-menu ul li.dg-translate .submenu {
        width: 580px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1199px) {
    .header-main .main-menu ul li.dg-translate .submenu {
        width: 400px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tighter rows than the standard submenu — 133 items have to fit. */
.header-main .main-menu ul li.dg-translate .submenu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: none;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dg-translate__code {
    flex: 0 0 auto;
    min-width: 32px;
    font-size: 11px;
    font-weight: 600;
    opacity: 0.55;
}

.dg-translate__name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.dg-translate .is-active > a {
    font-weight: 700;
    background: #ECECEC;
}