/* AlgoLodge – consistent 13 px desktop navigation in every language.
   This file is loaded LAST to override translation-specific 11.5/12 px rules.
   The existing 15 px collapsible navigation is retained for small screens. */
@media (min-width:1321px) {
  html[lang] .al-header #al-navigation {
    gap:clamp(7px,.75vw,11px)!important;
    min-width:0!important;
  }
  html[lang] .al-header #al-navigation > a,
  html[lang] .al-header #al-navigation > .al-nav-dropdown > a {
    font-size:13px!important;
    line-height:1.4!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
  }
  html[lang] .al-header .al-header-inner {
    gap:clamp(8px,1.1vw,18px)!important;
  }
  html[lang] .al-header .al-nav-dropdown .al-dropdown-toggle {
    padding:4px 3px!important;
  }
}
/* The menu only collapses on wider screens if its translated text cannot fit.
   The header's existing #menu button and its accessibility/state JS are reused. */
@media (min-width:1321px) {
  html.al-nav-needs-collapse .al-header {
    min-height:80px!important;
  }
  html.al-nav-needs-collapse .al-header .al-header-inner {
    display:flex!important;
    height:80px!important;
    min-height:80px!important;
  }
  html.al-nav-needs-collapse .al-header #menu {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    white-space:nowrap!important;
    min-height:38px;
  }
  html.al-nav-needs-collapse .al-header #menu::after {
    content:"Meny";
    font-size:13px;
    font-weight:700;
    margin-left:8px;
  }
  html.al-nav-needs-collapse .al-header #al-navigation {
    display:none!important;
    position:absolute!important;
    top:100%!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:12px clamp(16px,4vw,42px) 22px!important;
    background:#fff!important;
    box-shadow:0 15px 30px #10294222!important;
    z-index:450!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    gap:0!important;
    white-space:normal!important;
    max-height:calc(100dvh - 80px)!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
  }
  html.al-nav-needs-collapse .al-header #al-navigation.al-open,
  html.al-nav-needs-collapse .al-header #al-navigation.is-open,
  html.al-nav-needs-collapse .al-header #al-navigation[data-open="true"] {
    display:flex!important;
  }
  html.al-nav-needs-collapse .al-header #al-navigation > a,
  html.al-nav-needs-collapse .al-header #al-navigation > .al-nav-dropdown > a {
    font-size:15px!important;
    line-height:1.5!important;
    white-space:normal!important;
    padding:13px 8px!important;
  }
  html.al-nav-needs-collapse .al-header #al-navigation > a:not(.al-menu-primary) {
    border-bottom:1px solid #e5ebf1;
  }
  html.al-nav-needs-collapse .al-header #al-navigation > .al-nav-dropdown {
    display:flex!important;
    width:100%!important;
    flex-wrap:wrap!important;
    justify-content:space-between!important;
    align-items:center!important;
  }
  html.al-nav-needs-collapse .al-header #al-navigation .al-nav-dropdown .al-dropdown-toggle {
    min-width:44px;
    min-height:44px;
  }
  html.al-nav-needs-collapse .al-header #al-navigation .al-dropdown-menu {
    display:none!important;
    position:static!important;
    top:auto!important;
    left:auto!important;
    flex-basis:100%!important;
    width:100%!important;
    min-width:0!important;
    margin:0 0 8px!important;
    box-shadow:none!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
  html.al-nav-needs-collapse .al-header #al-navigation .al-nav-dropdown:not(.is-open):hover .al-dropdown-menu,
  html.al-nav-needs-collapse .al-header #al-navigation .al-nav-dropdown:not(.is-open):focus-within .al-dropdown-menu {
    display:none!important;
  }
  html.al-nav-needs-collapse .al-header #al-navigation .al-nav-dropdown.is-open .al-dropdown-menu {
    display:block!important;
  }
  html.al-nav-needs-collapse .al-header #al-navigation .al-dropdown-menu a {
    white-space:normal!important;
  }
  html.al-nav-needs-collapse .al-header #al-navigation > a.al-menu-primary {
    display:block!important;
    background:#1768c4!important;
    border:1px solid #1768c4!important;
    border-radius:8px!important;
    color:#fff!important;
    margin-top:12px!important;
    padding:13px 17px!important;
    text-align:center!important;
    font-weight:750!important;
  }
  html.al-nav-needs-collapse .al-header .al-why-dropdown::after {display:none!important;}
  html.al-nav-needs-collapse body.dark .al-header #al-navigation,
  html.al-nav-needs-collapse[data-theme="dark"] .al-header #al-navigation {
    background:#13253a!important;
  }
}
