/* Compact, viewport-safe corporate language selector — FREELANCE v1.1.11 */
body.public-auth-page .public-language-switcher {
  --lang-accent: #0c91c4;
  --lang-accent-deep: #086f98;
  --lang-ink: #1d2b38;
  --lang-muted: #687887;
  --lang-line: #c9d5dc;
  width: min(228px, calc(100vw - 24px));
  perspective: 900px;
}

body.public-auth-page .public-language-switcher__details {
  position: relative;
  width: 100%;
}

body.public-auth-page .public-language-switcher__trigger {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto 13px;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 7px;
  overflow: hidden;
  border: 1px solid rgba(53, 82, 101, .28) !important;
  border-radius: 5px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(237,243,247,.98));
  box-shadow:
    0 7px 16px rgba(18, 38, 52, .16),
    0 2px 4px rgba(18, 38, 52, .10),
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(45, 75, 94, .08);
  color: var(--lang-ink);
  text-align: left;
  transform: translateZ(0);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

body.public-auth-page .public-language-switcher__trigger::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, rgba(255,255,255,.75), transparent 36%, transparent 78%, rgba(12,145,196,.06));
}

body.public-auth-page .public-language-switcher__trigger::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(12,145,196,.58), transparent);
  opacity: .72;
}

body.public-auth-page .public-language-switcher__trigger:hover,
body.public-auth-page .public-language-switcher__trigger:focus-visible,
body.public-auth-page .public-language-switcher__details[open] .public-language-switcher__trigger {
  border-color: rgba(12, 145, 196, .62) !important;
  background: linear-gradient(180deg, #fff, #eaf5f9);
  box-shadow:
    0 9px 20px rgba(18, 55, 75, .18),
    0 3px 6px rgba(18, 55, 75, .10),
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(12,145,196,.10);
  transform: translateY(-1px);
  outline: none;
}

body.public-auth-page .public-language-switcher__globe {
  position: relative;
  z-index: 1;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #b9d7e4;
  border-radius: 4px;
  background: linear-gradient(180deg, #f7fcfe, #dceef5);
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgba(32,75,96,.12);
  color: var(--lang-accent-deep);
  font-size: 13px;
}

body.public-auth-page .public-language-switcher__identity {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

body.public-auth-page .public-language-switcher__flag,
body.public-auth-page .public-language-switcher__flag-shell,
body.public-auth-page .public-language-switcher__option img {
  border-radius: 2px !important;
}

body.public-auth-page .public-language-switcher__flag {
  width: 24px;
  height: 16px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(42,61,73,.18), 0 2px 4px rgba(31,52,65,.12);
}

body.public-auth-page .public-language-switcher__label {
  min-width: 0;
  overflow: hidden;
  color: var(--lang-ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .005em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.public-auth-page .public-language-switcher__code,
body.public-auth-page .public-language-switcher__panel-current,
body.public-auth-page .public-language-switcher__option-code {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
}

body.public-auth-page .public-language-switcher__code {
  position: relative;
  z-index: 1;
  padding: 3px 5px;
  border: 1px solid #cbd8df;
  border-radius: 3px;
  background: rgba(255,255,255,.66);
  color: var(--lang-accent-deep);
}

body.public-auth-page .public-language-switcher__chevron {
  position: relative;
  z-index: 1;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #536572;
  border-bottom: 1.5px solid #536572;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}

body.public-auth-page .public-language-switcher__details[open] .public-language-switcher__chevron {
  transform: translateY(2px) rotate(225deg);
}

body.public-auth-page .public-language-switcher__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: auto;
  left: var(--lang-panel-offset-x, 0px);
  z-index: 12060;
  width: min(320px, var(--lang-panel-available-width, calc(100vw - 24px)));
  max-width: var(--lang-panel-available-width, calc(100vw - 24px));
  padding: 6px;
  border: 1px solid rgba(77, 105, 122, .28);
  border-radius: 6px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(245,248,250,.99));
  box-shadow:
    0 16px 34px rgba(20, 43, 58, .19),
    0 5px 12px rgba(20, 43, 58, .10),
    inset 0 1px 0 #fff;
  transform-origin: top center;
  animation: languagePanelIn .18s cubic-bezier(.2,.72,.25,1);
}

body.public-auth-page .public-language-switcher__panel::before {
  content: "";
  position: absolute;
  top: -5px;
  right: auto;
  left: calc(var(--lang-panel-arrow-x, 28px) - 5px);
  width: 9px;
  height: 9px;
  border-top: 1px solid rgba(77,105,122,.28);
  border-left: 1px solid rgba(77,105,122,.28);
  background: #fff;
  transform: rotate(45deg);
}

body.public-auth-page .public-language-switcher.is-panel-up .public-language-switcher__panel {
  top: auto;
  bottom: calc(100% + 6px);
  transform-origin: bottom center;
  animation-name: languagePanelInUp;
}

body.public-auth-page .public-language-switcher.is-panel-up .public-language-switcher__panel::before {
  top: auto;
  bottom: -5px;
  border-top: 0;
  border-left: 0;
  border-right: 1px solid rgba(77,105,122,.28);
  border-bottom: 1px solid rgba(77,105,122,.28);
}

body.public-auth-page .public-language-switcher__panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 6px 6px;
  border-bottom: 1px solid #dfe7eb;
}

body.public-auth-page .public-language-switcher__panel-title {
  color: var(--lang-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .015em;
}

body.public-auth-page .public-language-switcher__panel-current {
  padding: 3px 5px;
  border: 1px solid #c9e6f0;
  border-radius: 3px;
  background: #edf9fc;
  color: var(--lang-accent-deep);
}

body.public-auth-page .public-language-switcher__menu {
  position: static !important;
  width: 100% !important;
  max-width: none !important;
  max-height: min(52vh, var(--lang-panel-menu-max-height, 350px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin: 5px 0 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  overflow-y: auto;
  transform: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  scrollbar-width: thin;
  scrollbar-color: #b7c8d1 transparent;
}

body.public-auth-page .public-language-switcher__option,
body.public-auth-page .public-language-switcher__option + .public-language-switcher__option {
  margin: 0;
}

body.public-auth-page .public-language-switcher__option a {
  min-height: 38px;
  display: grid !important;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 4px 6px !important;
  border: 1px solid transparent;
  border-radius: 4px !important;
  background: transparent;
  color: var(--lang-ink);
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

body.public-auth-page .public-language-switcher__option a:hover,
body.public-auth-page .public-language-switcher__option a:focus-visible {
  border-color: #bddde9;
  background: linear-gradient(180deg, #f8fdff, #eaf6fa);
  box-shadow: 0 3px 7px rgba(18, 91, 121, .08), inset 0 1px 0 #fff;
  color: var(--lang-accent-deep);
  transform: translateY(-1px);
  outline: none;
}

body.public-auth-page .public-language-switcher__option.is-current a {
  border-color: #a9d6e6;
  background: linear-gradient(180deg, #eefaff, #e1f3f8);
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgba(18, 125, 166, .07);
  color: var(--lang-accent-deep);
}

body.public-auth-page .public-language-switcher__flag-shell {
  width: 26px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid #d6e0e5;
  background: #fff;
  box-shadow: 0 2px 4px rgba(27,45,60,.07), inset 0 1px 0 #fff;
}

body.public-auth-page .public-language-switcher__option img {
  width: 20px;
  height: 13px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(24,39,52,.12);
}

body.public-auth-page .public-language-switcher__option-label {
  min-width: 0;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.public-auth-page .public-language-switcher__option-code {
  color: #798894;
}

body.public-auth-page .public-language-switcher__check {
  display: none;
}

body.public-auth-page .public-language-switcher.is-loading .public-language-switcher__trigger {
  pointer-events: none;
  opacity: .84;
}

body.public-auth-page .public-language-switcher.is-loading .public-language-switcher__globe i {
  animation: languageSpin .65s linear infinite;
}

@keyframes languagePanelIn {
  from { opacity: 0; transform: translateY(-5px) rotateX(-3deg) scale(.99); }
  to { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}

@keyframes languagePanelInUp {
  from { opacity: 0; transform: translateY(5px) rotateX(3deg) scale(.99); }
  to { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}

@keyframes languageSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
  body.public-auth-page .public-language-switcher {
    width: min(218px, calc(100vw - 24px));
  }

  body.public-auth-page .public-language-switcher__panel {
    right: auto;
    left: var(--lang-panel-offset-x, 0px);
    width: min(310px, var(--lang-panel-available-width, calc(100vw - 24px)));
    max-width: var(--lang-panel-available-width, calc(100vw - 24px));
    transform-origin: top center;
  }

  body.public-auth-page .public-language-switcher.is-panel-up .public-language-switcher__panel {
    transform-origin: bottom center;
  }
}

@media (max-width: 479px) {
  body.public-auth-page .public-language-switcher {
    width: min(206px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
  }

  body.public-auth-page .public-language-switcher__trigger {
    grid-template-columns: 25px minmax(0, 1fr) auto 12px;
    min-height: 40px;
    gap: 6px;
    padding: 4px 7px 4px 6px;
  }

  body.public-auth-page .public-language-switcher__globe {
    width: 25px;
    height: 25px;
  }

  body.public-auth-page .public-language-switcher__panel {
    width: min(248px, var(--lang-panel-available-width, calc(100vw - 20px)));
    max-width: var(--lang-panel-available-width, calc(100vw - 20px));
    padding: 5px;
    border-radius: 5px !important;
  }

  body.public-auth-page .public-language-switcher__menu {
    grid-template-columns: 1fr;
    max-height: min(58vh, var(--lang-panel-menu-max-height, 350px));
  }

  body.public-auth-page .public-language-switcher__option a {
    min-height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.public-auth-page .public-language-switcher *,
  body.public-auth-page .public-language-switcher *::before,
  body.public-auth-page .public-language-switcher *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}


/* Positioning is calculated by public-language.js to prevent viewport clipping. */

/* v1.1.11 — autonomous globe pictogram and exact left-edge alignment */
body.public-auth-page .public-language-switcher__globe i {
  display: none !important;
}

body.public-auth-page .public-language-switcher__globe::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23086f98' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M3.7 12h16.6M12 3.5c2.15 2.3 3.35 5.3 3.35 8.5S14.15 18.2 12 20.5C9.85 18.2 8.65 15.2 8.65 12S9.85 5.8 12 3.5Z'/%3E%3Cpath d='M5.55 7.45c1.95.9 4.14 1.35 6.45 1.35s4.5-.45 6.45-1.35M5.55 16.55c1.95-.9 4.14-1.35 6.45-1.35s4.5.45 6.45 1.35'/%3E%3C/svg%3E");
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.95));
}

body.public-auth-page .public-language-switcher.is-loading .public-language-switcher__globe::before {
  animation: languageSpin .65s linear infinite;
}

/* Desktop and laptop: align the selector with the outer left edge of the content card. */
body.public-auth-page .public-language-switcher {
  margin-left: var(--public-auth-left, 40px) !important;
}

/* Signup uses narrower gutters at intermediate widths; mirror its card exactly. */
@media (min-width: 901px) and (max-width: 1199px) {
  body.public-auth-page.public-signup-page .public-language-switcher {
    margin-left: 16px !important;
  }
}

@media (min-width: 768px) and (max-width: 900px) {
  body.public-auth-page.public-signup-page .public-language-switcher {
    margin-left: 12px !important;
  }
}

/* Phones: preserve centered placement and the existing safe side gutters. */
@media (max-width: 767px) {
  body.public-auth-page .public-language-switcher,
  body.public-auth-page.public-signup-page .public-language-switcher {
    margin-right: auto !important;
    margin-left: auto !important;
  }
}

