/* Przełącznik języków WPML: [sb_language_switcher] */

.sb_language_switcher {
  position: relative;
  z-index: 20;
  display: inline-flex;
  font-family: inherit;
}

.elementor-shortcode .sb_language_switcher .sb_language_switcher__toggle {
  all: unset;
  display: inline-flex !important;
  width: 52px !important;
  height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 6px !important;
  border: 1px solid var(--sb-color-border, #e5e5e5) !important;
  border-radius: 10px !important;
  appearance: none;
  background: var(--sb-color-white, #fff) !important;
  box-shadow: none !important;
  color: var(--sb-color-text, #101010) !important;
  font: inherit !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  transition:
    border-color 160ms ease;
}

.elementor-shortcode .sb_language_switcher .sb_language_switcher__toggle:hover,
.elementor-shortcode
  .sb_language_switcher.is-open
  .sb_language_switcher__toggle {
  border-color: #cfcfcf !important;
  background: var(--sb-color-white, #fff) !important;
  color: var(--sb-color-text, #101010) !important;
}

.elementor-shortcode
  .sb_language_switcher.is-open
  .sb_language_switcher__toggle {
  box-shadow: none !important;
}

.elementor-shortcode
  .sb_language_switcher
  .sb_language_switcher__toggle:focus-visible {
  outline: 2px solid var(--sb-color-secondary, #007c30) !important;
  outline-offset: 2px !important;
}

.sb_language_switcher .sb_language_switcher__flag {
  display: block;
  width: 20px !important;
  height: 20px !important;
  max-width: none !important;
  flex: 0 0 20px;
  object-fit: contain;
}

.sb_language_switcher__chevron {
  display: block !important;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  fill: none;
  color: var(--sb-color-text, #101010);
  stroke: currentColor !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: transform 160ms ease;
}

.sb_language_switcher.is-open .sb_language_switcher__chevron {
  transform: rotate(180deg);
}

.sb_language_switcher__chevron path {
  fill: none !important;
  stroke: currentColor !important;
}

.sb_language_switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: auto;
  left: -5px;
  width: max-content;
  min-width: 156px;
  padding: 4px;
  border: 1px solid var(--sb-color-border, #e5e5e5);
  border-radius: 12px;
  background: var(--sb-color-white, #fff);
  box-shadow: 0 12px 28px rgba(16, 16, 16, 0.1);
}

.sb_language_switcher__menu[hidden] {
  display: none !important;
}

.sb_language_switcher__option {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 7px;
  color: var(--sb-color-text, #101010);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 140ms ease;
}

.sb_language_switcher__option:hover,
.sb_language_switcher__option:focus-visible {
  background: #f2f8f4;
  color: var(--sb-color-text, #101010);
  text-decoration: none;
}

.sb_language_switcher__option.is-active {
  font-weight: 600;
}

.sb_language_switcher__check {
  width: 16px;
  height: 16px;
  margin-left: auto;
  fill: none;
  stroke: var(--sb-color-secondary, #007c30);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (max-width: 767px) {
  .elementor-shortcode .sb_language_switcher .sb_language_switcher__toggle {
    width: 50px !important;
    height: 36px !important;
    padding-inline: 5px !important;
  }
}

/* Prosty wariant z dwiema flagami: [sb_language_flags] */

.sb_language_flags {
  display: flex;
  width: 50px;
  height: 24px;
  align-items: center;
  gap: 2px;
  line-height: 1;
}

.sb_language_flags__link {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  opacity: 0.82;
  text-decoration: none;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.sb_language_flags__link:hover,
.sb_language_flags__link:focus-visible,
.sb_language_flags__link.is-active {
  background: transparent;
  box-shadow: none;
  opacity: 1;
  text-decoration: none;
}

.sb_language_flags__link:hover {
  transform: translateY(-1px);
}

.sb_language_flags__link:focus-visible {
  outline: 2px solid var(--sb-color-secondary, #007c30);
  outline-offset: 2px;
}

.sb_language_flags__flag {
  display: block;
  width: 24px !important;
  height: 24px !important;
  max-width: none !important;
  object-fit: contain;
}
