/* goyo.health language switch (header). Place at the end of goyo.css.
   Same layer as the header rules. No new face, size, weight or color:
   16px / 500 / #fff is the live header nav link; #e8c46a is the header focus and underline color. */
@layer site21 {
  html body .site11-header .site11-bar > .goyo-lang {
    flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; margin: 0;
  }
  /* wide header (links in one row, no Menu button): the switch goes to the far right, after "Sign in" */
  @media (min-width: 1200px) {
    html body .site11-header .site11-bar:has(> .site11-menu:not([data-nav-compact])) > .goyo-lang { order: 5; }
  }
  html body .site11-header .goyo-lang > a,
  html body .site11-header .gnav > a.goyo-lang-item {
    display: inline-flex !important; align-items: center !important; gap: 6px; box-sizing: border-box;
    min-height: 44px !important; padding: 0 4px !important;
    color: #fff !important; font-family: inherit !important; font-size: 16px !important; font-weight: 500 !important;
    line-height: 1.2 !important; text-decoration: none !important; white-space: nowrap;
  }
  html body .site11-header .goyo-lang > a:is(:hover, :focus-visible) { box-shadow: inset 0 -2px 0 #e8c46a !important; }
  html body header.site11-header .goyo-lang > a:focus-visible { outline: 3px solid #e8c46a !important; outline-offset: 2px !important; }
  html body .site11-header :is(.goyo-lang, .goyo-lang-item) svg { width: 20px; height: 20px; flex: 0 0 auto; }
  /* LANGW (17 Nov): the globe and the full word ("Español" / "English") show at every width.
     Phones: the gaps in the bar and inside the switch are tightened so logo, switch and Menu stay on one row. */
  html body .site11-header .gnav > a.goyo-lang-item { display: none !important; }
  @media (max-width: 429px) {
    html body .site11-header .site11-bar { column-gap: 4px !important; }
    html body .site11-header .site11-bar > .goyo-lang > a { gap: 4px; padding: 0 2px !important; }
  }
  /* the smallest phones (320 to 359 px, iPhone SE 1st gen): smaller side margins and gaps, Menu keeps a 44 px target */
  @media (max-width: 359px) {
    html body .site11-header .site11-bar { padding-left: 8px !important; padding-right: 8px !important; column-gap: 2px !important; }
    html body .site11-header .site11-bar > .goyo-lang > a { gap: 2px; padding: 0 !important; }
    html body .site11-header .site11-bar .site11-menu > summary { padding: 8px 4px !important; }
  }
  /* Spanish sale notice: the Terms link sits inside a sentence, so it stays inline (WCAG 2.5.8 inline exception);
     the site rule for a lone link in a paragraph would otherwise put it on its own line */
  html body main .goyo-es-sale p > a:only-child:not(.btn):not(.button) { display: inline !important; min-height: 0 !important; }
}
