/* Shared globe language switcher for standalone (auth, error, maintenance, guest) pages. */
.yfs-lang-globe{position:relative;display:inline-flex;align-items:center;justify-content:flex-end;margin:0 0 1rem auto;z-index:5}
.yfs-lang-globe__btn{display:inline-flex;align-items:center;gap:.4rem;margin:0;padding:.35rem .7rem;min-height:44px;min-width:44px;border:1px solid rgba(0,29,61,.18);border-radius:999px;background:#fff;color:#001d3d;font:inherit;font-size:.85rem;font-weight:600;letter-spacing:.02em;cursor:pointer;line-height:1}
.yfs-lang-globe__btn:hover,.yfs-lang-globe__btn:focus-visible{border-color:#005f73;outline:2px solid rgba(0,95,115,.25);outline-offset:2px}
.yfs-lang-globe__icon{display:block;flex:none}
.yfs-lang-globe__code{min-width:1.4em}
.yfs-lang-globe__menu{position:absolute;top:calc(100% + .35rem);right:0;margin:0;padding:.35rem 0;list-style:none;min-width:9.5rem;background:#fff;border:1px solid rgba(0,29,61,.12);border-radius:10px;box-shadow:0 10px 28px rgba(0,29,61,.12)}
.yfs-lang-globe__menu[hidden]{display:none}
.yfs-lang-globe__menu a{display:block;padding:.45rem .85rem;color:#001d3d;text-decoration:none;font-size:.92rem}
.yfs-lang-globe__menu a:hover,.yfs-lang-globe__menu a:focus-visible{background:#eaf3f4}
.yfs-lang-globe__menu a[aria-current="true"]{font-weight:700;color:#005f73}

.yfs-standalone-back-to-office{display:inline-flex;align-items:center;justify-content:center;margin-top:1.25rem;padding:.55rem 1rem;min-height:44px;border:1px solid rgba(0,29,61,.28);border-radius:8px;background:transparent;color:#001d3d;text-decoration:none;font-size:.92rem;font-weight:600;line-height:1.2}
.yfs-standalone-back-to-office:hover,.yfs-standalone-back-to-office:focus-visible{border-color:#005f73;color:#005f73;outline:2px solid rgba(0,95,115,.25);outline-offset:2px}

.yfs-auth .yfs-lang-globe{position:absolute;top:1rem;right:1rem;margin:0}
.yfs-auth{position:relative}

/* Maintenance page placement (no .yfs-auth wrapper). */
.maintenance-languages.yfs-lang-globe{display:flex;margin:0 0 1rem auto}

/* Maintenance page is dark; keep the outlined back-office button readable. */
.yfs-maintenance-back{margin-top:1.25rem;text-align:center}
.yfs-maintenance-back .yfs-standalone-back-to-office{color:#e8f4f6;border-color:rgba(255,255,255,.5)}
.yfs-maintenance-back .yfs-standalone-back-to-office:hover,
.yfs-maintenance-back .yfs-standalone-back-to-office:focus-visible{color:#fff;border-color:#fff}

/* A single menu and 44px controls across public, guest and office pages. */
.yfs-lang-globe form{margin:0}
.yfs-lang-globe__menu a,.yfs-lang-globe__menu button{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%;min-height:44px;margin:0;padding:.45rem .85rem;border:0;background:#fff;color:#001d3d;font:inherit;font-size:.92rem;text-align:left;text-decoration:none;cursor:pointer}
.yfs-lang-globe__menu a:hover,.yfs-lang-globe__menu a:focus-visible,.yfs-lang-globe__menu button:hover,.yfs-lang-globe__menu button:focus-visible{background:#eaf3f4}
.yfs-lang-globe__menu [aria-current="true"]{font-weight:700;color:#005f73}
.yfs-lang-globe__check{font-size:1.1rem;line-height:1}
/* Standalone cards put the globe above the logo in normal document flow. */
:is(.yfs-auth--account, .yfs-standalone-card) {
  --yfs-auth-card-gap: 0.75rem;
  padding-block-start: 1rem;
}
.yfs-auth:not(:is(.yfs-auth--account, .yfs-standalone-card)):has(.yfs-lang-globe) { padding-top: 11rem; }
:is(.yfs-auth--account, .yfs-standalone-card) > .yfs-lang-globe {
  position: relative;
  inset: auto;
  display: flex;
  width: max-content;
  margin: 0 0 var(--yfs-auth-card-gap) auto;
}
.yfs-auth:is(.yfs-auth--account, .yfs-standalone-card) > .yfs-lang-globe {
  margin-inline-end: -.5rem;
}
:is(.yfs-auth--account, .yfs-standalone-card) > :is(.yfs-auth-mark, .logo) {
  /* Crop the artwork's transparent top inset while keeping the lower edge. */
  aspect-ratio: 208 / 77;
  object-fit: cover;
  object-position: center bottom;
}
.yfs-standalone-card a[href] { cursor: pointer; }

.yfs-lang-globe__menu{z-index:1080}
/* Reserve the menu's space before guest-page content, including on first paint. */
body:has(> main > header .yfs-lang-globe) > main > header{margin-bottom:8rem}

/* Keep the open menu clear of the following headings on guest and gate pages. */
.yfs-attachments-header:has(.yfs-lang-globe){margin-bottom:8rem!important}
.yfs-legacy-gate:has(.yfs-lang-globe) .yfs-lang-globe{margin-bottom:8rem}

/* The bar already has its own spacing. The standalone page margin would push it over the heading. */
header .language .yfs-lang-globe,
.page-main-header .yfs-lang-globe,
.language-mobile .yfs-lang-globe{margin:0}

/* Account screens style every button as the teal action. Keep this control the shared white pill. */
.yfs-auth .yfs-lang-globe__btn{
  margin:0;
  padding:.35rem .7rem;
  min-height:44px;
  min-width:44px;
  border:1px solid rgba(0,29,61,.18);
  border-radius:999px;
  background:#fff;
  color:#001d3d;
  font-size:.85rem;
  font-weight:600;
  line-height:1;
}
.yfs-auth .yfs-lang-globe__btn:hover,
.yfs-auth .yfs-lang-globe__btn:active,
.yfs-auth .yfs-lang-globe__btn:focus-visible{background:#fff;color:#001d3d;border-color:#005f73}
.yfs-auth .yfs-lang-globe form{display:block;width:auto;gap:0;margin:0}
.yfs-auth .yfs-lang-globe__menu button{
  min-height:44px;
  border:0;
  border-radius:0;
  background:#fff;
  color:#001d3d;
  font-size:.92rem;
  font-weight:400;
}
.yfs-auth .yfs-lang-globe__menu [aria-current="true"]{font-weight:700;color:#005f73}
.page-main-header .yfs-lang-globe__btn,
.yfs-legacy-gate .yfs-lang-globe__btn,
header .yfs-lang-globe__btn{
  background:#fff;
  color:#001d3d;
  border:1px solid rgba(0,29,61,.18);
  border-radius:999px;
}

/* Phone drawer: an absolute menu is clipped by the drawer scroller. Keep the list in the flow. */
@media (max-width: 1199.98px){
  .language-mobile .yfs-lang-globe{display:flex;flex-direction:column;align-items:flex-start;width:100%}
  .language-mobile .yfs-lang-globe__menu{position:static;width:100%;min-width:0;right:auto;top:auto}
}

/* The public header paints every right-bar link white. Keep this list readable. */
header .menu .header-right .yfs-lang-globe__menu a,
header .menu .header-right .yfs-lang-globe__menu a:hover,
header .menu .header-right .yfs-lang-globe__menu a:focus,
header .menu .header-right .yfs-lang-globe__menu a:focus-visible{
  color:#001d3d;
  background:#fff;
  font-size:.92rem;
}
header .menu .header-right .yfs-lang-globe__menu a[aria-current="true"]{color:#005f73;font-weight:700}

/* Theme sheets set li { display: inline-block }, which puts the two languages on one line. */
header .yfs-lang-globe__menu li,
.language-mobile .yfs-lang-globe__menu li,
.yfs-lang-globe__menu li{display:block;width:100%}

/* Narrow office header: the list is wider than the globe and crosses the title.
   Pin it to the screen edge, under the bar, so the title stays on the left. */
@media (max-width: 575.98px){
  .page-main-header .yfs-lang-globe__menu{
    position:fixed;
    top:4.25rem;
    right:8px;
    left:auto;
    width:max-content;
  }
}
