/* wc-footernav 20261110shell1 (fra tabs1): Chart → Skan → Alerts → Menu som fast footer på mobil.
   Erstatter topnav-løsningen 20261106topnav1. Desktop (≥901px) skjuler footeren
   (ingen dobbelt nav; header-links og chart-sidebar beholdes). */

@media(max-width:900px){
  :root{--wc-wcb-h:64px}
  /* 20261110alleb1: padding = barens loft (min 64+env, 98) + 16px luft.
     iOS Chrome kan rapportere env(safe-area-inset-bottom) som ~150–200px, så
     64+env uden min() gav et stort tomt felt. Over 900px er uændret. */
  html body:has(nav#wcb),
  html body:has(nav#wc-topnav){
    padding-bottom:calc(min(64px + env(safe-area-inset-bottom,0px), 98px) + 16px)!important;
  }
  /* 20261110akutbar3: samme model som akutbar2, plus højere specificitet
     så Pro #wcb.wcs-tabbar.wc-topnav ikke taber til wc-oprydning.css.
     20261110akutbar2: fast bar. height = 64px + safe-area, max-height samme + loft 98px
     (64+34). iOS Chrome kan rapportere env(safe-area-inset-bottom) som ~150–200px
     (værktøjslinjen), mens bottom:0 allerede sidder over den. height:auto og
     max-height:none lod baren vokse til ~260px med ikonerne centreret.
     padding-bottom er 0, så safe-area ikke tælles dobbelt (den ligger i height). */
  html body nav#wcb.wcs-tabbar.wc-topnav,
  html body #wcb.wcs-tabbar.wc-topnav,
  html body nav#wcb.wc-topnav,
  html body nav#wcb,
  html body nav#wc-topnav{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    grid-template-rows:64px!important;
    align-items:start!important;
    align-content:start!important;
    justify-items:stretch!important;
    position:fixed!important;
    left:0!important;right:0!important;bottom:0!important;top:auto!important;
    z-index:55!important;
    height:calc(64px + env(safe-area-inset-bottom,0px))!important;
    min-height:64px!important;
    max-height:calc(64px + env(safe-area-inset-bottom,0px))!important;
    max-height:98px!important;
    padding:0 max(8px,calc((100% - 640px)/2)) 0!important;
    margin:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    width:100%!important;max-width:100%!important;
    background:#ffffff!important;background-color:#ffffff!important;
    border-top:1px solid #e6e8ec!important;
    border-bottom:0!important;
    box-shadow:0 -4px 16px rgba(15,23,42,.06)!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    transform:none!important;-webkit-transform:none!important;
    visibility:visible!important;
  }
  html body nav#wcb.wc-topnav>:not(a):not(button),
  html body nav#wc-topnav>:not(a):not(button){
    display:none!important;height:0!important;max-height:0!important;
    margin:0!important;padding:0!important;overflow:hidden!important;
    border:0!important;
  }
  html body nav#wcb.wc-topnav>a,
  html body nav#wcb.wc-topnav>button,
  html body nav#wc-topnav>a,
  html body nav#wc-topnav>button{
    all:unset;box-sizing:border-box;position:relative;
    display:flex!important;flex-direction:column!important;
    align-items:center;justify-content:center;gap:3px;
    min-width:0;min-height:64px;height:64px!important;max-height:64px!important;padding:0 4px;align-self:start!important;
    color:#475569!important;
    font:700 11.5px/1 Inter,system-ui,sans-serif!important;
    text-decoration:none;cursor:pointer;
    -webkit-tap-highlight-color:transparent;white-space:nowrap;
  }
  html body nav#wcb.wc-topnav>*>*,
  html body nav#wc-topnav>*>*{color:inherit!important}
  html body nav#wcb.wc-topnav svg,
  html body nav#wc-topnav svg{
    width:22px!important;height:22px!important;flex:0 0 22px;
    fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
  }
  html body nav#wcb.wc-topnav>[aria-current="page"],
  html body nav#wc-topnav>[aria-current="page"],
  html body nav#wcb.wc-topnav[data-active="menu"]>[data-nav="menu"]{color:#0f766e!important}
  html body nav#wcb.wc-topnav>[data-nav]::before,
  html body nav#wc-topnav>[data-nav]::before{content:none!important}
  html body nav#wcb.wc-topnav>[aria-current="page"]::after,
  html body nav#wc-topnav>[aria-current="page"]::after,
  html body nav#wcb.wc-topnav[data-active="menu"]>[data-nav="menu"]::after{
    content:"";position:absolute;left:28%;right:28%;top:0;bottom:auto;
    height:3px;border-radius:0 0 3px 3px;background:#0f766e;
  }
  html body nav#wcb.wc-topnav>a:focus-visible,
  html body nav#wcb.wc-topnav>button:focus-visible,
  html body nav#wc-topnav>a:focus-visible,
  html body nav#wc-topnav>button:focus-visible{
    outline:2px solid #0f766e;outline-offset:-3px;border-radius:8px;
  }
  /* header-dubletter kun væk på mobil — på desktop vises de igen */
  html body:has(nav#wcb.wc-topnav) #wch .wch-links>[data-nav="analyse"],
  html body:has(nav#wcb.wc-topnav) #wch .wch-links>[data-nav="skan"],
  html body:has(nav#wcb.wc-topnav) #wch .wch-links>[data-nav="alerts"]{display:none!important}
  html body:has(nav#wc-topnav) header nav.d>[data-cta="nav-chart"],
  html body:has(nav#wc-topnav) header nav.d>[data-cta="nav-skan"],
  html body:has(nav#wc-topnav) header nav.d>[data-cta="nav-alerts"]{display:none!important}
}

@media(min-width:901px){
  :root{--wc-wcb-h:0px}
  html body nav#wcb.wc-topnav,
  html body nav#wc-topnav{display:none!important}
}

@media(hover:hover) and (max-width:900px){
  html body nav#wcb.wc-topnav>*:hover,
  html body nav#wc-topnav>*:hover{color:#0f766e!important}
}
@media(max-width:360px){
  html body nav#wcb.wc-topnav>*,
  html body nav#wc-topnav>*{gap:2px;font-size:10.5px!important;padding:0 1px}
  html body nav#wcb.wc-topnav svg,
  html body nav#wc-topnav svg{width:20px!important;height:20px!important;flex-basis:20px}
}

/* fuldskærm skjuler footeren */
body.wcfs-on nav#wcb.wc-topnav,
body.wcfs1 nav#wcb.wc-topnav,
body:has(#wc-fs) nav#wcb.wc-topnav{display:none!important}
html body nav#wcb.wc-topnav+#wc-delay{margin-top:0!important}

/* fnav2: skjul en eventuel ekstra kopi (samme 4 punkter) bag den faste bar */
html body nav#wcb ~ nav#wcb,
html body nav#wcb ~ nav.wcs-tabbar,
html body nav#wc-topnav ~ nav#wcb,
html body nav#wc-topnav ~ nav#wc-topnav,
html body nav.wcs-tabbar ~ nav.wcs-tabbar{display:none!important}


/* tabs1 20261109: M1 lukket ark + fnav3 H1/L1/L2 */
@media(max-width:900px){
  /* H1: chart-menu over bundbar */
  html body #kr2-sheet,
  html body #kr2-sheet.kr-drawer,
  html body #kr2-sheet.kr-drawer.on{
    z-index:1100!important;
  }
  html body #kr2-sheet.kr-drawer.on,
  html body #kr2-scrim.on{
    bottom:calc(var(--wc-wcb-h,64px) + env(safe-area-inset-bottom,0px))!important;
  }
  html body #kr2-sheet.kr-drawer.on .kr-mbody{
    padding-bottom:calc(12px + env(safe-area-inset-bottom))!important;
  }
  /* M1/fnav4: kun ÅBENT #m over baren; lukket fanger ingen klik */
  html body #m.sheet:not(.on),
  html body .sheet#m:not(.on),
  html body #m.sheet:not(.on) *{
    z-index:1!important;
    pointer-events:none!important;
  }
  html body #m.sheet:not(.on),
  html body .sheet#m:not(.on){
    display:none!important;
    visibility:hidden!important;
  }
  html body #m.sheet.on,
  html body .sheet#m.on{
    z-index:1100!important;
    pointer-events:auto!important;
    display:flex!important;
    visibility:visible!important;
  }
  /* L1/tabs1 + 20261110alleb1: ÉN body-padding = bar-loft + 16px luft */
  html body:has(nav#wcb),
  html body:has(nav#wc-topnav){
    padding-bottom:calc(min(64px + env(safe-area-inset-bottom,0px), 98px) + 16px)!important;
    scroll-padding-bottom:calc(min(64px + env(safe-area-inset-bottom,0px), 98px) + 16px)!important;
  }
  #wc-fnav3-pad{display:none!important;height:0!important;margin:0!important;padding:0!important}
  html body:has(nav#wcb) .app,
  html body:has(nav#wcb) #tech-list,
  html body:has(nav#wcb) #tech-det,
  html body:has(nav#wcb) .tech-tbl{
    margin-bottom:0!important;
    padding-bottom:0!important;
  }
  html body:has(nav#wcb) footer,
  html body:has(nav#wcb) #wcf{
    margin-bottom:16px!important;
  }
}

