/* Solutions Automobile Languages — premium compact language switcher */
.sal-language-switcher {
  position: relative;
  z-index: 10020;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  vertical-align: middle;
  width: 42px;
  height: 42px;
  margin: 0 !important;
  line-height: 0;
  font-family: "Source Sans 3", Arial, sans-serif;
}

.sal-language-shell {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(32, 33, 36, .12);
  border-radius: 999px;
  background: rgba(248, 247, 244, .98);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
  transition: width .34s cubic-bezier(.2,.75,.25,1), box-shadow .25s ease;
}

.sal-language-switcher.has-options:hover .sal-language-shell,
.sal-language-switcher.has-options:focus-within .sal-language-shell,
.sal-language-switcher.has-options.is-open .sal-language-shell {
  width: 214px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .10);
}

.sal-language-options {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity .18s ease .07s, transform .26s ease .07s;
}

.sal-language-switcher.has-options:hover .sal-language-options,
.sal-language-switcher.has-options:focus-within .sal-language-options,
.sal-language-switcher.has-options.is-open .sal-language-options {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.sal-language-current {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sal-language-current:focus-visible,
.sal-language-option:focus-visible {
  outline: 2px solid #c5a266;
  outline-offset: 2px;
}

.sal-language-option {
  min-width: 56px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  padding: 0 9px;
  border-radius: 999px;
  color: #6f6b66 !important;
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .11em;
  line-height: 1;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: background .22s ease, color .22s ease, transform .22s ease;
}

.sal-language-option:hover {
  color: #202124 !important;
  transform: translateY(-1px);
}

.sal-language-option.is-current {
  background: #202124;
  color: #f8f7f4 !important;
}

.sal-flag {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
  box-sizing: border-box;
  border: 1px solid rgba(32, 33, 36, .10);
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
}

.sal-language-option.is-current .sal-flag {
  border-color: rgba(255,255,255,.32);
}

.sal-flag--fr { background-image: url('../flags/fr.svg'); }
.sal-flag--pt { background-image: url('../flags/pt.svg'); }
.sal-flag--gb { background-image: url('../flags/gb.svg'); }

@media (max-width: 767px) {
  .sal-language-switcher.has-options:hover .sal-language-shell {
    width: 42px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
  }

  .sal-language-switcher.has-options:hover .sal-language-options {
    opacity: 0;
    transform: translateX(8px);
    pointer-events: none;
  }

  .sal-language-switcher.has-options.is-open .sal-language-shell {
    width: 214px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .10);
  }

  .sal-language-switcher.has-options.is-open .sal-language-options {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }
}

.sal-language-switcher.is-static .sal-language-current { cursor: default; }

/* v0.1.5 — exact visual centering inside the closed language bubble */
.sal-language-current .sal-flag {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  /* Optical correction: the circular Union Jack feels visually right-heavy when mathematically centred. */
  transform: translate(calc(-50% - 1px), -50%);
  pointer-events: none;
}

/* Keep the flags inside the expanded options in the normal flex flow. */
.sal-language-option .sal-flag {
  position: static;
  margin: 0;
  transform: none;
}

/* v0.2.5 — Solutions Automobile brand accent.
   Blue is deliberately reserved for interaction states, while the neutral
   surface keeps the header compact and understated. */
.sal-language-switcher {
  --sal-brand-blue: #004366;
  --sal-brand-blue-deep: #003650;
  --sal-brand-blue-soft: rgba(0, 67, 102, .09);
}

/* Keep the outer pill neutral in every state. The blue accent belongs only to
   the current-language bubble and interactive options, not to the shell border. */
.sal-language-shell,
.sal-language-switcher.has-options:hover .sal-language-shell,
.sal-language-switcher.has-options:focus-within .sal-language-shell,
.sal-language-switcher.has-options.is-open .sal-language-shell {
  border-color: rgba(32, 33, 36, .12);
}

/* The closed language bubble becomes the brand-blue control on interaction. */
.sal-language-switcher.has-options:hover .sal-language-current,
.sal-language-switcher.has-options:focus-within .sal-language-current,
.sal-language-switcher.has-options.is-open .sal-language-current {
  background: var(--sal-brand-blue);
}

.sal-language-current:focus-visible,
.sal-language-option:focus-visible {
  outline-color: var(--sal-brand-blue);
}

/* Explicit colours prevent Elementor/theme link-hover rules from applying a red accent. */
.sal-language-switcher .sal-language-option:hover,
.sal-language-switcher .sal-language-option:focus-visible {
  background: var(--sal-brand-blue-soft) !important;
  color: var(--sal-brand-blue) !important;
}

.sal-language-switcher .sal-language-option.is-current,
.sal-language-switcher .sal-language-option.is-current:hover,
.sal-language-switcher .sal-language-option.is-current:focus-visible {
  background: var(--sal-brand-blue) !important;
  color: #f8f7f4 !important;
}

.sal-language-switcher .sal-language-option.is-current:hover,
.sal-language-switcher .sal-language-option.is-current:focus-visible {
  background: var(--sal-brand-blue-deep) !important;
}
