/* I am J shared standard header layout.
   Contract on tablet/mobile:
   brand | language picker | hamburger
   This file must load after style.css and page-level <style> blocks. */

@media (max-width: 1080px) {
  .site-header > .container.header-inner,
  .site-header .container.header-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 104px 46px !important;
    grid-template-areas: "brand language menu" !important;
    align-items: center !important;
    column-gap: 10px !important;
    width: min(94%, 1220px) !important;
    max-width: 1220px !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    position: relative !important;
    overflow: visible !important;
  }

  .site-header .header-inner > .brand-lockup {
    grid-area: brand !important;
    display: flex !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .site-header .header-inner > .brand-lockup .brand-copy {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .site-header .header-inner > .brand-lockup .brand-copy strong,
  .site-header .header-inner > .brand-lockup .brand-copy small {
    display: block !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .site-header .header-inner > .brand-lockup .brand-copy strong {
    font-size: 1.05rem !important;
    line-height: 1.08 !important;
  }

  .site-header .header-inner > .brand-lockup .brand-copy small {
    margin-top: 4px !important;
    font-size: .62rem !important;
    line-height: 1.12 !important;
  }

  .site-header .header-inner > .iamj-header-language-picker {
    grid-area: language !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    display: block !important;
    width: 104px !important;
    min-width: 0 !important;
    max-width: 104px !important;
    margin: 0 !important;
    z-index: auto !important;
  }

  .site-header .header-inner > .iamj-header-language-picker .iamj-header-language-select,
  .site-header .header-inner > .iamj-header-language-picker select {
    display: block !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 25px 0 9px !important;
    font-size: .68rem !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  .site-header .header-inner > .menu-toggle {
    grid-area: menu !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-self: end !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1002 !important;
  }

  /* Force the three hamburger bars to remain visible regardless of
     page-level button/span styles or the selected color theme. */
  .site-header .header-inner > .menu-toggle > span {
    display: block !important;
    position: static !important;
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 2px !important;
    min-height: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none;
    box-shadow: none !important;
    pointer-events: none !important;
  }

  .site-header .header-inner > .primary-nav {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 680px) {
  .site-header > .container.header-inner,
  .site-header .container.header-inner {
    grid-template-columns: minmax(0, 1fr) 84px 42px !important;
    column-gap: 7px !important;
    width: 96% !important;
  }

  .site-header .header-inner > .brand-lockup .brand-copy strong {
    font-size: .96rem !important;
  }

  .site-header .header-inner > .brand-lockup .brand-copy small {
    font-size: .57rem !important;
  }

  .site-header .header-inner > .iamj-header-language-picker {
    width: 84px !important;
    max-width: 84px !important;
  }

  .site-header .header-inner > .iamj-header-language-picker .iamj-header-language-select,
  .site-header .header-inner > .iamj-header-language-picker select {
    height: 40px !important;
    padding: 0 20px 0 7px !important;
    font-size: .60rem !important;
  }

  .site-header .header-inner > .menu-toggle {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
  }
}

@media (max-width: 420px) {
  .site-header > .container.header-inner,
  .site-header .container.header-inner {
    grid-template-columns: minmax(0, 1fr) 76px 40px !important;
    column-gap: 5px !important;
    width: 97% !important;
  }

  .site-header .header-inner > .brand-lockup .brand-copy small {
    display: none !important;
  }

  .site-header .header-inner > .iamj-header-language-picker {
    width: 76px !important;
    max-width: 76px !important;
  }

  .site-header .header-inner > .menu-toggle {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
  }
}



/* Desktop language picker width adjustment */
@media (min-width: 1081px) {
  .iamj-header-language-picker{
    min-width: 150px !important;
    width: 150px !important;
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
  }

  .iamj-header-language-picker select,
  .iamj-header-language-select{
    width:120px !important;
    min-width:120px !important;
    max-width:120px !important;
    display:inline-block !important;
    vertical-align:middle !important;
  }

  .iamj-header-language-picker .globe-icon,
  .iamj-header-language-picker svg,
  .iamj-header-language-picker i{
    flex:0 0 auto !important;
    margin-right:6px !important;
  }
}


/* Final desktop no-wrap fix for globe + language picker */
@media (min-width: 1081px) {
  .iamj-header-language-picker {
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    white-space: nowrap !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  .iamj-header-language-picker select,
  .iamj-header-language-select {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    flex: 0 0 150px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .iamj-header-language-picker .globe-icon,
  .iamj-header-language-picker svg,
  .iamj-header-language-picker i {
    flex: 0 0 auto !important;
    display: inline-block !important;
    margin: 0 !important;
  }
}
