/* ==========================================================================
   AutoSols Language Switcher — Menu Button Matching UI & Slimmest Dropdown
   ========================================================================== */

.lang-switcher-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  z-index: 1000;
}

/* Button matches the exact theme-btn styling with white pill border */
.lang-switcher-btn.theme-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  border: 1px solid var(--white, #ffffff) !important;
  border-radius: 100px !important;
  outline: none !important;
  user-select: none;
  background-color: transparent !important;
  color: var(--white, #ffffff) !important;
  font-family: "Teko", sans-serif !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  padding: 16px 28px !important;
  min-width: 105px !important;
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.4s ease-in-out !important;
  vertical-align: middle !important;
}

.lang-switcher-btn.theme-btn .icon-1,
.lang-switcher-btn.theme-btn .icon-2 {
  filter: grayscale(100%) brightness(300%) !important;
  transition: all 0.4s ease-in-out !important;
}

.lang-switcher-btn.theme-btn:hover {
  background-color: var(--theme, #ff5a00) !important;
  color: #000000 !important;
  border-color: var(--theme, #ff5a00) !important;
}

.lang-switcher-btn.theme-btn:hover .icon-1,
.lang-switcher-btn.theme-btn:hover .icon-2 {
  filter: brightness(0) !important;
}

.lang-switcher-wrapper.open .lang-switcher-btn.theme-btn {
  border-color: var(--theme, #ff5a00) !important;
  box-shadow: 0 0 15px rgba(255, 90, 0, 0.3) !important;
}

.lang-switcher-btn .lang-btn-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
}

.lang-switcher-btn .lang-flag {
  font-size: 14px;
  line-height: 1;
}

.lang-switcher-btn .lang-code {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

/* SLIMMEST DROPDOWN CARD */
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 155px;
  background: rgba(13, 13, 13, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 90, 0, 0.05);
  padding: 4px;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.lang-switcher-wrapper.open .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option-item {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 5px 8px;
  color: #cccccc;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
}

.lang-option .lang-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-option .lang-flag {
  font-size: 13px;
  line-height: 1;
}

.lang-option .lang-name {
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.lang-option .lang-code-tag {
  font-size: 9.5px;
  color: #777777;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
}

.lang-option:hover {
  background: rgba(255, 90, 0, 0.14);
  color: #ff5a00;
  transform: translateX(2px);
}

.lang-option:hover .lang-name {
  color: #ff5a00;
}

.lang-option:hover .lang-code-tag {
  background: rgba(255, 90, 0, 0.25);
  color: #ff5a00;
}

.lang-option.active {
  background: rgba(255, 90, 0, 0.2);
  color: #ff5a00;
}

.lang-option.active .lang-name {
  color: #ff5a00;
}

.lang-option.active .lang-code-tag {
  background: #ff5a00;
  color: #000000;
}

/* RTL Support for Dropdown */
[dir="rtl"] .lang-dropdown-menu {
  right: auto !important;
  left: 0 !important;
  text-align: right !important;
}

[dir="rtl"] .lang-option {
  text-align: right !important;
}

[dir="rtl"] .lang-option:hover {
  transform: translateX(-2px);
}

/* Mobile responsive */
@media (max-width: 991px) {
  .lang-switcher-btn.theme-btn {
    padding: 8px 14px !important;
    font-size: 12px !important;
  }
  .lang-dropdown-menu {
    right: 0;
    width: 145px;
  }
}

.mobile-lang-switcher {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.mobile-lang-switcher .lang-switcher-btn.theme-btn {
  width: 100%;
  justify-content: space-between !important;
  padding: 10px 18px !important;
}

.mobile-lang-switcher .lang-dropdown-menu {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* Sticky Header - Language Switcher Exact Match with MENU Button */
#header-sticky.sticky .lang-switcher-btn,
#header-sticky.sticky .lang-switcher-btn.theme-btn,
.sticky.header-2 .lang-switcher-btn,
.sticky.header-2 .lang-switcher-btn.theme-btn,
.header-1.header-2.sticky .lang-switcher-btn,
.header-1.header-2.sticky .lang-switcher-btn.theme-btn {
  background-color: #000000 !important;
  border: 1px solid #000000 !important;
  color: #ffffff !important;
}

#header-sticky.sticky .lang-switcher-btn:hover,
#header-sticky.sticky .lang-switcher-btn.theme-btn:hover,
.sticky.header-2 .lang-switcher-btn:hover,
.sticky.header-2 .lang-switcher-btn.theme-btn:hover,
.header-1.header-2.sticky .lang-switcher-btn:hover,
.header-1.header-2.sticky .lang-switcher-btn.theme-btn:hover {
  background-color: var(--theme, #ff5a00) !important;
  border-color: var(--theme, #ff5a00) !important;
  color: #000000 !important;
}

#header-sticky.sticky .lang-switcher-btn .icon-1,
#header-sticky.sticky .lang-switcher-btn .icon-2,
#header-sticky.sticky .lang-switcher-btn.theme-btn .icon-1,
#header-sticky.sticky .lang-switcher-btn.theme-btn .icon-2,
.sticky.header-2 .lang-switcher-btn .icon-1,
.sticky.header-2 .lang-switcher-btn .icon-2,
.sticky.header-2 .lang-switcher-btn.theme-btn .icon-1,
.sticky.header-2 .lang-switcher-btn.theme-btn .icon-2,
.header-1.header-2.sticky .lang-switcher-btn .icon-1,
.header-1.header-2.sticky .lang-switcher-btn .icon-2 {
  filter: grayscale(100%) brightness(300%) !important;
}

#header-sticky.sticky .lang-switcher-btn:hover .icon-1,
#header-sticky.sticky .lang-switcher-btn:hover .icon-2,
#header-sticky.sticky .lang-switcher-btn.theme-btn:hover .icon-1,
#header-sticky.sticky .lang-switcher-btn.theme-btn:hover .icon-2,
.sticky.header-2 .lang-switcher-btn:hover .icon-1,
.sticky.header-2 .lang-switcher-btn:hover .icon-2,
.sticky.header-2 .lang-switcher-btn.theme-btn:hover .icon-1,
.sticky.header-2 .lang-switcher-btn.theme-btn:hover .icon-2,
.header-1.header-2.sticky .lang-switcher-btn:hover .icon-1,
.header-1.header-2.sticky .lang-switcher-btn:hover .icon-2 {
  filter: brightness(0) !important;
}

