/* Mascot Language Popup v0.8 - polished desktop + mobile viewport panel */
:root{
  --mlp-font-family: inherit;
  --mlp-font-size: 13px;
  --mlp-font-weight: 400;
  --mlp-header-color: rgba(255,255,255,.88);
  --mlp-header-hover-color: #fff;
}

/* Header button: designed to blend into Journal 3 instead of looking like an added module. */
.mlp-header-host{
  display:inline-flex!important;
  align-items:center!important;
  position:relative!important;
  vertical-align:middle!important;
  margin:0 10px 0 0!important;
  padding:0!important;
  z-index:5!important;
  font-family:var(--mlp-font-family)!important;
  font-size:var(--mlp-font-size)!important;
  font-weight:var(--mlp-font-weight)!important;
  color:var(--mlp-header-color)!important;
}
.mlp-trigger{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  min-width:0!important;
  height:38px!important;
  padding:0 8px!important;
  margin:0!important;
  border:0!important;
  outline:0!important;
  border-radius:3px!important;
  background:transparent!important;
  color:inherit!important;
  font-family:inherit!important;
  font-size:inherit!important;
  font-weight:inherit!important;
  line-height:1!important;
  letter-spacing:inherit!important;
  cursor:pointer!important;
  box-shadow:none!important;
  white-space:nowrap!important;
  position:static!important;
  transform:none!important;
  transition:background-color .15s ease,color .15s ease!important;
}
.mlp-trigger:hover,.mlp-trigger:focus{
  background:rgba(255,255,255,.055)!important;
  color:var(--mlp-header-hover-color)!important;
}
.mlp-trigger-flag{
  width:22px!important;
  height:14px!important;
  border-radius:1px!important;
  object-fit:cover!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.14),0 0 0 1px rgba(0,0,0,.10) inset!important;
  flex:0 0 22px!important;
}
.mlp-trigger-label{
  font:inherit!important;
  line-height:1!important;
  color:inherit!important;
}
.mlp-trigger-chevron{
  display:inline-block!important;
  font-family:Arial,sans-serif!important;
  font-size:9px!important;
  line-height:1!important;
  opacity:.58!important;
  margin-left:-1px!important;
  transform:translateY(1px)!important;
}

/* Used only when Journal/currency cannot be found. */
.mlp-header-host.mlp-fallback-host{
  position:fixed!important;
  left:16px!important;
  bottom:18px!important;
  right:auto!important;
  top:auto!important;
  margin:0!important;
  padding:2px 4px!important;
  z-index:2147482000!important;
  background:#fff!important;
  color:#222!important;
  border:1px solid rgba(0,0,0,.10)!important;
  border-radius:5px!important;
  box-shadow:0 5px 20px rgba(0,0,0,.16)!important;
}

/* Language dropdown. No page overlay, so navigation stays visible and usable. */
.mlp-popover{
  position:fixed!important;
  display:none!important;
  width:min(1000px,calc(100vw - 24px))!important;
  max-height:min(440px,calc(100vh - 120px))!important;
  background:#fff!important;
  color:#20252a!important;
  border:1px solid rgba(0,0,0,.13)!important;
  border-radius:6px!important;
  box-shadow:0 14px 38px rgba(0,0,0,.20)!important;
  z-index:2147483000!important;
  overflow:auto!important;
  padding:10px 14px!important;
  box-sizing:border-box!important;
  font-family:var(--mlp-font-family)!important;
  font-size:var(--mlp-font-size)!important;
  font-weight:400!important;
}
.mlp-popover.mlp-open{display:block!important}
.mlp-grid{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:0 14px!important;
  width:100%!important;
}
.mlp-item{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  min-width:0!important;
  height:40px!important;
  padding:0 5px!important;
  border-bottom:1px solid #e9ecef!important;
  color:#1d2228!important;
  text-decoration:none!important;
  background:#fff!important;
  cursor:pointer!important;
  box-sizing:border-box!important;
  border-radius:2px!important;
  transition:background-color .12s ease,color .12s ease!important;
}
.mlp-item:hover{
  background:#f5f6f7!important;
  color:#111!important;
  text-decoration:none!important;
}
.mlp-item.is-current{
  font-weight:600!important;
  background:#f7f8f9!important;
}
.mlp-item.is-current:after{
  content:'✓'!important;
  margin-left:auto!important;
  font-size:11px!important;
  opacity:.55!important;
}
.mlp-flag{
  width:22px!important;
  height:14px!important;
  border-radius:1px!important;
  object-fit:cover!important;
  box-shadow:0 0 0 1px rgba(0,0,0,.10)!important;
  flex:0 0 22px!important;
}
.mlp-name{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-family:inherit!important;
  font-size:13px!important;
  line-height:1.2!important;
}


/* Header inside the mobile language panel. Hidden on desktop. */
.mlp-mobile-head{
  display:none!important;
}

/* Google selector is controlled by JS but remains invisible. */
#google_translate_element_mlp{
  position:fixed!important;
  left:-10000px!important;
  top:-10000px!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
iframe.goog-te-banner-frame,
body > .skiptranslate iframe{
  display:none!important;
  visibility:hidden!important;
}
html,body{top:0!important}

@media(max-width:1100px){
  .mlp-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .mlp-popover{max-height:480px!important}
}
@media(max-width:760px){
  .mlp-header-host{margin-right:3px!important}
  .mlp-trigger{
    height:36px!important;
    padding:0 6px!important;
    gap:5px!important;
  }
  .mlp-trigger-label{display:none!important}
  .mlp-trigger-chevron{display:none!important}

  /* Mobile panel is always inside the visible browser viewport. */
  .mlp-popover{
    position:fixed!important;
    box-sizing:border-box!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
    padding:0 10px 10px!important;
    max-height:calc(100vh - 16px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    border-radius:8px!important;
    box-shadow:0 10px 35px rgba(0,0,0,.26)!important;
  }

  .mlp-mobile-head{
    position:sticky!important;
    top:0!important;
    z-index:3!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    height:46px!important;
    margin:0 -10px 4px!important;
    padding:0 12px!important;
    background:#fff!important;
    border-bottom:1px solid #e7e9ec!important;
    color:#20252a!important;
    box-sizing:border-box!important;
  }
  .mlp-mobile-head strong{
    font-family:var(--mlp-font-family)!important;
    font-size:14px!important;
    font-weight:600!important;
  }
  .mlp-mobile-close{
    width:34px!important;
    height:34px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:50%!important;
    background:#f3f4f5!important;
    color:#333!important;
    font:400 24px/32px Arial,sans-serif!important;
    text-align:center!important;
    cursor:pointer!important;
  }

  .mlp-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:0 8px!important;
  }
  .mlp-item{
    height:44px!important;
    min-height:44px!important;
    padding:0 5px!important;
    overflow:visible!important;
  }
  .mlp-name{
    display:block!important;
    max-width:none!important;
    overflow:visible!important;
    text-overflow:clip!important;
    white-space:nowrap!important;
    font-size:13px!important;
    color:#1d2228!important;
  }
  .mlp-flag{
    display:block!important;
    width:24px!important;
    height:16px!important;
    flex:0 0 24px!important;
  }
}

@media(max-width:380px){
  .mlp-grid{grid-template-columns:1fr!important}
  .mlp-item{height:42px!important;min-height:42px!important}
  .mlp-name{font-size:13px!important}
}
