.iml-switcher {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
  z-index: 9999;
}

.iml-switcher .iml-switcher__item {
  align-items: center;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  box-sizing: border-box;
  color: #075985;
  cursor: pointer;
  display: inline-flex;
  font: 700 12px/1 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  gap: 5px;
  justify-content: center;
  letter-spacing: normal;
  margin: 0;
  min-height: 44px;
  padding: 0 11px;
  text-decoration: none;
  text-indent: 0;
  text-transform: none;
  touch-action: manipulation;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  white-space: nowrap;
}

.iml-switcher .iml-switcher__item:hover,
.iml-switcher .iml-switcher__item:focus,
.iml-switcher .iml-switcher__item.is-active {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}

.iml-switcher .iml-switcher__item:focus-visible {
  outline: 3px solid #0c4a6e;
  outline-offset: 2px;
}

/*
 * Floating language control.
 * Kept deliberately isolated from the shortcode so themes cannot turn the
 * fixed switcher into a large menu. The collapsed state is only one 48px
 * control; language choices expand horizontally toward the page content.
 */
#iml-language-switcher.iml-switcher--floating {
  align-items: center;
  animation: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  bottom: auto !important;
  box-shadow: none !important;
  box-sizing: border-box;
  clear: none;
  clip: auto !important;
  clip-path: none !important;
  display: flex !important;
  filter: none !important;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0;
  height: 48px;
  isolation: isolate;
  left: auto !important;
  margin: 0 !important;
  max-height: none;
  max-width: calc(100vw - 16px);
  opacity: 1 !important;
  overflow: visible !important;
  padding: 0;
  pointer-events: auto !important;
  position: fixed !important;
  right: 10px !important;
  right: max(10px, env(safe-area-inset-right)) !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  visibility: visible !important;
  width: 48px;
  z-index: 1000000 !important;
}

#iml-language-switcher .iml-switcher__toggle {
  -webkit-appearance: none;
  align-items: center;
  appearance: none;
  background: rgba(255, 255, 255, .97) !important;
  border: 1px solid rgba(15, 23, 42, .10) !important;
  border-radius: 16px 4px 4px 16px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .18), 0 2px 8px rgba(15, 23, 42, .08);
  box-sizing: border-box;
  color: #0f172a !important;
  cursor: pointer;
  display: inline-flex !important;
  flex: 0 0 48px;
  font: inherit;
  height: 48px;
  justify-content: center;
  margin: 0 !important;
  opacity: 1 !important;
  outline: 0;
  padding: 0 !important;
  pointer-events: auto !important;
  position: relative;
  text-decoration: none;
  touch-action: manipulation;
  transform: translateZ(0);
  transition: border-radius .2s ease, box-shadow .2s ease, transform .2s ease, background-color .2s ease;
  visibility: visible !important;
  width: 48px;
  z-index: 2;
}

#iml-language-switcher .iml-switcher__toggle:hover {
  background: #fff !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .22), 0 2px 9px rgba(15, 23, 42, .09);
}

#iml-language-switcher .iml-switcher__toggle:active {
  transform: scale(.96);
}

#iml-language-switcher .iml-switcher__toggle:focus-visible {
  outline: 3px solid rgba(2, 132, 199, .35);
  outline-offset: 3px;
}

#iml-language-switcher .iml-switcher__toggle-flag {
  display: block;
  font: 24px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  height: 28px;
  transform: translateX(-2px);
  width: 28px;
}

#iml-language-switcher .iml-switcher__toggle-caret {
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  height: 6px;
  opacity: .55;
  position: absolute;
  right: 5px;
  top: 20px;
  transform: rotate(45deg);
  transition: transform .2s ease, opacity .2s ease;
  width: 6px;
}

#iml-language-switcher .iml-switcher__panel {
  align-items: center;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .18), 0 2px 10px rgba(15, 23, 42, .06);
  box-sizing: border-box;
  display: flex;
  gap: 5px;
  justify-content: center;
  opacity: 0;
  padding: 4px;
  pointer-events: none;
  position: absolute;
  right: 54px;
  top: 0;
  transform: translateX(10px) scale(.97);
  transform-origin: right center;
  transition: opacity .18s ease, transform .2s cubic-bezier(.2,.8,.2,1), visibility .18s ease;
  visibility: hidden;
  white-space: nowrap;
}

#iml-language-switcher.is-open .iml-switcher__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  visibility: visible;
}

#iml-language-switcher.is-open .iml-switcher__toggle {
  border-radius: 12px 4px 4px 12px;
}

#iml-language-switcher.is-open .iml-switcher__toggle-caret {
  opacity: .8;
  transform: rotate(225deg);
}

#iml-language-switcher .iml-switcher__item {
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: #475569;
  display: inline-flex !important;
  flex: 0 0 44px;
  flex-direction: column;
  font-size: 10px;
  gap: 1px;
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  opacity: 1 !important;
  padding: 0 5px;
  pointer-events: auto !important;
  visibility: visible !important;
}

#iml-language-switcher .iml-switcher__item-flag {
  font: 20px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

#iml-language-switcher .iml-switcher__item-code {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .03em;
  margin-top: 1px;
}

#iml-language-switcher .iml-switcher__item:hover,
#iml-language-switcher .iml-switcher__item:focus {
  background: #f1f5f9;
  border-color: transparent;
  color: #0f172a;
  transform: translateY(-1px);
}

#iml-language-switcher .iml-switcher__item.is-active {
  background: #e0f2fe;
  border-color: transparent;
  color: #0369a1;
}

#iml-language-switcher .iml-switcher__item:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 1px;
}

@media (max-width: 580px) {
  #iml-language-switcher.iml-switcher--floating {
    height: 44px;
    right: 6px !important;
    right: max(6px, env(safe-area-inset-right)) !important;
    width: 44px;
  }

  #iml-language-switcher .iml-switcher__toggle {
    border-radius: 14px 3px 3px 14px;
    flex-basis: 44px;
    height: 44px;
    width: 44px;
  }

  #iml-language-switcher .iml-switcher__toggle-flag {
    font-size: 22px;
    height: 26px;
    width: 26px;
  }

  #iml-language-switcher .iml-switcher__toggle-caret {
    right: 4px;
    top: 18px;
  }

  #iml-language-switcher .iml-switcher__panel {
    border-radius: 14px;
    gap: 2px;
    padding: 3px;
    right: 50px;
  }

  #iml-language-switcher .iml-switcher__item {
    border-radius: 11px;
    flex-basis: 44px;
    height: 44px;
    min-height: 44px;
    min-width: 44px;
    padding: 0 3px;
  }

  #iml-language-switcher .iml-switcher__item-flag {
    font-size: 19px;
  }

  #iml-language-switcher .iml-switcher__item-code {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #iml-language-switcher .iml-switcher__toggle,
  #iml-language-switcher .iml-switcher__toggle-caret,
  #iml-language-switcher .iml-switcher__panel,
  #iml-language-switcher .iml-switcher__item {
    transition: none !important;
  }
}

@media print {
  #iml-language-switcher.iml-switcher--floating {
    display: none !important;
  }
}

.iml-dual-price {
  display: inline-block;
  line-height: 1.18;
  max-width: 100%;
  vertical-align: middle;
}

.iml-price-usd {
  display: block;
  white-space: nowrap;
}

.iml-price-brl {
  display: block;
  font-size: .68em;
  font-weight: 400;
  margin-top: 2px;
  opacity: .7;
  white-space: normal;
}

.iml-currency-notice {
  clear: both;
  font-size: 13px;
  margin: 12px 0 !important;
}

.iml-prices-usd del .iml-price-brl,
.iml-prices-usd del + ins .iml-price-brl {
  font-size: .62em;
}

@media (max-width: 580px) {
  .iml-price-brl {
    font-size: .64em;
  }
}

/* Fast feedback while navigating between language URLs. */
html.iml-language-changing { cursor: progress; }
html.iml-language-changing .iml-switcher { pointer-events: none; opacity: .72; }
