/*
 *  Menu Language Switcher
 */

.menu-item-object-language_switcher .trp-flag-image {
  display: inline-block;
  margin: -1px 5px;
  vertical-align: baseline;
  padding: 0;
  border: 0;
  border-radius: 0;
}

/*
 *  Shortcode Language Switcher
 */
.trp-language-switcher {
  height: 52px;
  position: relative;
  box-sizing: border-box;
  width: 136px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trp-language-switcher > div {
  box-sizing: border-box;
  padding: 4px 20px 3px 13px;
  background: #6c58d8;
  transition: all 0s;
  position: relative;
  border-radius: 4px;
}

/* RTL support for main container */
html[dir="rtl"] .trp-language-switcher > div {
  padding: 4px 13px 3px 20px;
}

.trp-language-switcher > div::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid white;
  border-bottom: 1.5px solid white;
  right: 20px;
  top: 19px;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  border-left: none;
  border-top: none;
}

/* RTL support for arrow */
html[dir="rtl"] .trp-language-switcher > div::after {
  right: auto;
  left: 20px;
  border-right: 1.5px solid white;
  border-bottom: 1.5px solid white;
}

.trp-language-switcher > div:hover::after {
  transform: rotate(-135deg);
}

.trp-language-switcher > div > a {
  display: block;
  padding: 7px 7px;
  border-radius: 3px;
  text-decoration: none;
  color: white;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  transition: none;
}

.trp-language-switcher > div > a:hover {
  background: rgba(10, 2, 48, 0.1);
  border-radius: 4px;
}
.trp-language-switcher > div > a.trp-ls-shortcode-disabled-language {
  cursor: default;
}

.trp-language-switcher > div > a.trp-ls-shortcode-disabled-language:hover {
  background: none;
}

.trp-language-switcher > div > a > img {
  display: inline;
  margin: 0 3px;
  width: 18px;
  height: 12px;
  border-radius: 0;
}

.trp-language-switcher .trp-ls-shortcode-current-language {
  display: inline-block;
}

.trp-language-switcher:focus .trp-ls-shortcode-current-language,
.trp-language-switcher:hover .trp-ls-shortcode-current-language {
  visibility: hidden;
}

.trp-language-switcher .trp-ls-shortcode-language {
  display: inline-block;
  height: 1px;
  overflow: hidden;
  visibility: hidden;
  z-index: 1;
  max-height: 250px;
  overflow-y: auto;
  left: 0;
  top: 0;
  min-height: auto;
  transition: visibility 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

/* RTL support for dropdown positioning */
html[dir="rtl"] .trp-language-switcher .trp-ls-shortcode-language {
  left: auto;
  right: 0;
}

.trp-language-switcher:focus .trp-ls-shortcode-language,
.trp-language-switcher:hover .trp-ls-shortcode-language {
  visibility: visible;
  max-height: 250px;
  padding: 4px 13px;
  height: auto;
  overflow-y: auto;
  position: absolute;
  left: 0;
  top: 0;
  display: inline-block !important;
  min-height: auto;
  opacity: 1;
  width: 100%;
}

/* RTL support for dropdown when visible */
html[dir="rtl"] .trp-language-switcher:focus .trp-ls-shortcode-language,
html[dir="rtl"] .trp-language-switcher:hover .trp-ls-shortcode-language {
  left: auto;
  right: 0;
  text-align: right;
}

/* RTL support for dropdown items alignment */
html[dir="rtl"] .trp-language-switcher .trp-ls-shortcode-language a {
  text-align: right;
}

/*
 *  Front-end Admin Bar Icon
 */
#wpadminbar #wp-admin-bar-trp_edit_translation .ab-icon:before {
  content: "\f326";
  top: 3px;
}

@media screen and (max-width: 782px) {
  #wpadminbar #wp-admin-bar-trp_edit_translation > .ab-item {
    text-indent: 0;
  }

  #wpadminbar li#wp-admin-bar-trp_edit_translation {
    display: block;
  }
}

/*
 * Fix Language Switcher Shortcode in Elementor Popup
 */
.elementor-shortcode .trp-ls-shortcode-current-language,
.elementor-shortcode .trp-ls-shortcode-language {
  width: 136px !important;
}

/*
 * Fix Language Switcher Shortcode in Wishlist Page
 */
.woocommerce-wishlist .elementor-shortcode {
  background: transparent !important;
}
