/* =========================================================================
   WP Translator — language switcher styles
   ========================================================================= */

/* Wrapper (every style) */
.wpt-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.95em;
  line-height: 1.4;
  color: inherit;
}
.wpt-switcher a {
  color: inherit;
  text-decoration: none;
}

/* -------------------- Inline (names / codes) -------------------- */
.wpt-style-inline_names .wpt-lang,
.wpt-style-inline_codes .wpt-lang {
  padding: 2px 4px;
  border-radius: 3px;
}
.wpt-style-inline_names .wpt-lang--current,
.wpt-style-inline_codes .wpt-lang--current {
  font-weight: 600;
  text-decoration: underline;
  cursor: default;
  pointer-events: none;
}
.wpt-sep {
  opacity: 0.5;
}

/* -------------------- Flag rows (flags_only / flags_names) -------------------- */
.wpt-style-flags_only,
.wpt-style-flags_names {
  gap: 0.6em;
}
.wpt-style-flags_only .wpt-lang,
.wpt-style-flags_names .wpt-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 2px 4px;
  border-radius: 4px;
}
.wpt-style-flags_only .wpt-lang--current,
.wpt-style-flags_names .wpt-lang--current {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  cursor: default;
  pointer-events: none;
}

/* -------------------- Flag image base + shapes -------------------- */
.wpt-flag {
  width: 20px;
  height: 15px;
  vertical-align: middle;
  object-fit: cover;
  display: inline-block;
  background: #eee;
  border: 0;
}
.wpt-flag-circle .wpt-flag {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}
.wpt-flag-square .wpt-flag {
  width: 18px;
  height: 18px;
  border-radius: 0;
}
.wpt-flag-rounded .wpt-flag {
  width: 20px;
  height: 16px;
  border-radius: 3px;
}

/* -------------------- Dropdown -------------------- */
.wpt-style-dropdown {
  position: relative;
}
.wpt-style-dropdown .wpt-trigger {
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  line-height: 1.2;
}
.wpt-style-dropdown .wpt-trigger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.wpt-style-dropdown .wpt-caret {
  font-size: 0.7em;
  opacity: 0.7;
}
.wpt-style-dropdown .wpt-globe {
  width: 1em;
  height: 1em;
}
.wpt-style-dropdown .wpt-menu {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  margin: 4px 0 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  width: max-content;
  display: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}
.wpt-style-dropdown.is-open .wpt-menu {
  display: block;
}
.wpt-style-dropdown .wpt-menu li {
  margin: 0;
  padding: 0;
}
.wpt-style-dropdown .wpt-menu a {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 7px 12px;
  color: #222;
  font-size: 0.95em;
}
.wpt-style-dropdown .wpt-menu a:hover,
.wpt-style-dropdown .wpt-menu a:focus {
  background: #f1f1f1;
}

/* -------------------- Floating positions -------------------- */
.wpt-floating {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.08);
  color: #222;
}
.wpt-floating .wpt-trigger {
  border: 0;
  padding: 0;
  color: inherit;
}
.wpt-floating .wpt-menu {
  inset-inline-start: auto;
}
.wpt-floating.wpt-floating_br {
  bottom: 20px;
  inset-inline-end: 20px;
}
.wpt-floating.wpt-floating_bl {
  bottom: 20px;
  inset-inline-start: 20px;
}
.wpt-floating.wpt-floating_br .wpt-menu {
  inset-inline-end: 0;
}
.wpt-floating.wpt-floating_bl .wpt-menu {
  inset-inline-start: 0;
}
.wpt-floating .wpt-menu {
  bottom: calc(100% + 6px);
  top: auto;
}

/* -------------------- In-menu placement -------------------- */
.menu-item.wpt-menu-item {
  display: flex;
  align-items: center;
}

/* -------------------- Browser-language banner -------------------- */
#wpt-banner {
  position: fixed;
  bottom: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  background: #1f2937;
  color: #fff;
  padding: 10px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  font-size: 0.95em;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.18);
}
#wpt-banner[hidden] { display: none; }
#wpt-banner .wpt-banner-cta {
  background: #fff;
  color: #1f2937;
  padding: 4px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
#wpt-banner .wpt-banner-cta:hover { background: #e5e7eb; }
#wpt-banner .wpt-banner-close {
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 1.4em;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  margin-inline-start: auto;
}

/* -------------------- Screen reader helper -------------------- */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
