/**
 * Site translation switcher. See inc/site-translate.php.
 *
 * Colors resolve through the role tokens in style.css, so light and dark
 * appearance flip together; fallbacks cover MLD templates that load without
 * the theme's token sheet.
 */

.bne-xlate {
    position: fixed;
    left: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 9990; /* below MLD modals (10000+), above page chrome */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--bmn-border, #d6dce4);
    border-radius: 999px;
    background: var(--bmn-card, #ffffff);
    color: var(--bmn-text, #16202c);
    font: 600 14px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
    cursor: pointer;
}

.bne-xlate[hidden] {
    display: none;
}

.bne-xlate:hover {
    border-color: var(--bmn-border-strong, #aab4c0);
}

.bne-xlate:focus-visible {
    outline: 3px solid var(--bmn-focus-ring, #93c5fd);
    outline-offset: 2px;
}

.bne-xlate__icon {
    flex: none;
}

/* Clear the bottom-left "Recently viewed" pill on the full-screen map search
   and the fixed status bar on mobile property pages. */
.bne-fullscreen-page .bne-xlate {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* Inside the map search shell (moved there by the script): above the list,
   below the filter modal (10000) and the List/Map toggle (9998). */
.mld-fixed-wrapper > .bne-xlate {
    z-index: 9997;
}

/* Phones: clear the listing-count chip and List/Map toggle at the bottom. */
@media (max-width: 768px) {
    .bne-fullscreen-page .bne-xlate {
        bottom: calc(112px + env(safe-area-inset-bottom, 0px));
    }
}

.mld-property-mobile-v3 .bne-xlate {
    bottom: calc(52px + env(safe-area-inset-bottom, 0px));
}

/* Google's translator UI: its stylesheet is blocked by the site CSP, so hide
   the unstyled banner frame and "original text" tooltip outright. */
body > .skiptranslate,
iframe.skiptranslate,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

@media print {
    .bne-xlate {
        display: none !important;
    }
}
