/* Hotfix for V3 style: desktop button matches actual search field height; V3 positioning preserved. */
/* OLLITAL language selector — layout V2
   The selector is a direct child of the full header row and is absolutely positioned.
   It is NOT inside the search widget and does NOT participate in flex sizing. */
.ollital-header-main-inner {
  position: relative !important;
}

.ollital-header-main-inner > .ollital-header-language-switcher {
  position: absolute !important;
  z-index: 100050 !important;
  display: inline-flex !important;
  align-items: center !important;
  width: 78px !important;
  min-width: 78px !important;
  max-width: 78px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  /* left/top are calculated against the real search box by the JS file. */
}

.ollital-language-switcher,
.ollital-language-switcher * {
  box-sizing: border-box;
}

.ollital-language-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  width: 78px !important;
  min-width: 78px !important;
  max-width: 78px !important;
  height: var(--ollital-search-height, 42px) !important;
  min-height: var(--ollital-search-height, 42px) !important;
  max-height: var(--ollital-search-height, 42px) !important;
  padding: 0 6px !important;
  border: 1px solid #dedede !important;
  border-radius: 2px !important;
  background: #fff !important;
  color: #333 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.ollital-language-toggle:hover,
.ollital-language-toggle:focus-visible {
  border-color: #b9b9b9 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .06) !important;
}

.ollital-language-current-flag,
.ollital-language-option img {
  display: block;
  width: 18px !important;
  height: 12px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  flex: 0 0 18px !important;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, .12);
}

.ollital-language-current-code {
  display: inline-block;
  min-width: 17px;
  text-align: left;
  letter-spacing: .1px;
}

.ollital-language-chevron {
  display: block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin: 0;
  transition: transform .18s ease;
}

.ollital-language-switcher.is-open .ollital-language-chevron {
  transform: rotate(180deg);
}

.ollital-language-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100100;
  width: 166px;
  max-height: 250px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 5px 0;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

.ollital-language-menu[hidden] {
  display: none !important;
}

.ollital-language-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 7px 11px;
  color: #444 !important;
  background: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}

.ollital-language-option:hover,
.ollital-language-option:focus-visible {
  color: #111 !important;
  background: #f4f4f4;
  outline: none;
  text-decoration: none !important;
}

.ollital-language-option.is-current {
  background: #f7f7f7;
  font-weight: 600;
}

.ollital-language-name {
  flex: 1 1 auto;
}

.ollital-language-option-code {
  color: #999;
  font-size: 11px;
  letter-spacing: .3px;
}

.ollital-language-switcher.is-loading .ollital-language-toggle {
  opacity: .65;
  cursor: wait;
}

/* Mobile/tablet: keep the selector available at the right of the header row.
   It remains absolutely positioned and cannot resize the logo/menu/search area. */
@media (max-width: 1024px) {
  .ollital-header-main-inner > .ollital-header-language-switcher {
    left: auto !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .ollital-language-toggle {
    --ollital-search-height: 32px;
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
  }
}
