/* Wild Rose Translate - Dropdown styles
   Scoped to #wrTranslateSlot to avoid bleeding into host app.
*/

#wrTranslateSlot.wrt-slot {
  position: relative;
  display: block;
  box-sizing: border-box;

  /* Beat basically any host app menu */
  z-index: 2147483647;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Dropdown container is fixed-positioned and JS places it near the slot */
#wrTranslateSlot .wrt-container {
  position: fixed;
  top: 0;
  left: 0;

  /* Reduced by about 1/3 */
  width: min(240px, 92vw);

  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  overflow: hidden;

  z-index: 2147483647;
}

#wrTranslateSlot .wrt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

#wrTranslateSlot .wrt-header {
  border-bottom: 1px solid rgba(0,0,0,0.10);
}

#wrTranslateSlot .wrt-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

#wrTranslateSlot .wrt-title {
  font-weight: 700 !important;
  color: #000 !important;
  opacity: 1 !important;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

#wrTranslateSlot .wrt-translation-note {
  margin-top: 6px;
  padding: 6px 2px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
  color: inherit !important; /* follow host theme text color */
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  box-sizing: border-box;
}

#wrTranslateSlot .wrt-search {
  border-bottom: 1px solid rgba(0,0,0,0.10);
}

#wrTranslateSlot .wrt-searchbox {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 8px;
  outline: none;
  font-size: 13px;
}

#wrTranslateSlot .wrt-searchbox:focus {
  border-color: rgba(0,0,0,0.35);
}

#wrTranslateSlot .wrt-list {
  max-height: min(340px, 52vh);
  overflow: auto;
  padding: 6px;
}

#wrTranslateSlot .wrt-lang {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

#wrTranslateSlot .wrt-lang:hover {
  background: rgba(0,0,0,0.06);
}

#wrTranslateSlot .wrt-lang:focus {
  outline: none;
  background: rgba(0,0,0,0.08);
}

#wrTranslateSlot .wrt-lang-left {
  min-width: 0;
  flex: 1 1 auto;
}

/* "English - English" on one line */
#wrTranslateSlot .wrt-lang-text {
  font-size: 13px;
  line-height: 1.15;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#wrTranslateSlot .wrt-lang-name {
  font-weight: 600;
}

#wrTranslateSlot .wrt-lang-sep {
  opacity: 0.65;
  font-weight: 500;
}

#wrTranslateSlot .wrt-lang-native {
  opacity: 0.78;
  font-weight: 500;
}

#wrTranslateSlot .wrt-lang-right {
  flex: 0 0 auto;
  min-width: 18px;
  text-align: right;
  opacity: 0.9;
}

#wrTranslateSlot .wrt-lang.is-selected {
  background: rgba(0,0,0,0.06);
}

#wrTranslateSlot .wrt-check {
  font-weight: 800;
  font-size: 14px;
}

#wrTranslateSlot .wrt-empty {
  padding: 12px 10px;
  font-size: 13px;
  opacity: 0.75;
}

/* Small screens: give the slot less horizontal footprint and keep the translation note compact */
@media (max-width: 749.98px) {
  #wrTranslateSlot.wrt-slot {
    width: 50%;
    max-width: 50%;
    min-width: 0;
    flex: 1 1 50%;
  }

  #wrTranslateSlot .wrt-translation-note {
    margin-top: 4px;
    padding: 4px 2px;
    font-size: 11px;
    line-height: 1.15;

    /* Keep it to 2 lines to avoid pushing/overlapping nearby UI */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }

  /* Slightly tighter dropdown UI on mobile widths */
  #wrTranslateSlot .wrt-row {
    gap: 8px;
    padding: 8px 10px;
  }

  #wrTranslateSlot .wrt-searchbox {
    padding: 8px 9px;
    font-size: 12px;
  }

  #wrTranslateSlot .wrt-lang {
    gap: 8px;
    padding: 8px 8px;
  }

  #wrTranslateSlot .wrt-lang-text {
    font-size: 12px;
  }
}

/* =========================================================
   Google Translate: hide banner + default injected widgets
   ========================================================= */

/* Hide Google's default widgets + banner containers */
#google_translate_element,
.skiptranslate {
  display: none !important;
}

/* Safety: if Google ever adds skiptranslate to html/body, don't hide the whole page */
html.skiptranslate,
body.skiptranslate {
  display: block !important;
}

/* Also hide common GT frames explicitly (belt + suspenders) */
iframe.goog-te-banner-frame,
.goog-te-banner-frame,
iframe.goog-te-menu-frame,
.goog-te-menu-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-te-balloon-frame {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

/* Remove the top offset Google applies to the page */
body {
  top: 0 !important;
}

html {
  margin-top: 0 !important;
}