/* Gemensam layout för huvudmenyn. Denna fil ska vara den sista navigationsstilen. */
body > header,
body > header.site-header {
  box-sizing: border-box;
  width: 100%;
  padding: 14px 24px !important;
  background: #0b1f3a !important;
  color: #fff;
}

body > header .nav,
body > header.site-header .nav {
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  min-height: 42px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

body > header .logo,
body > header.site-header .logo {
  flex: 0 0 auto;
  margin: 0 !important;
  width: 226px;
  height: 50px;
  color: transparent !important;
  font-size: 0;
  line-height: 0;
  text-decoration: none !important;
  background: url('logo-ipo-kompassen-cropped.png') left center / contain no-repeat;
  white-space: nowrap;
}

body > header .global-menu,
body > header.site-header .global-menu {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 18px;
}

body > header .global-menu a,
body > header.site-header .global-menu a {
  box-sizing: border-box;
  margin: 0 !important;
  padding: 6px 0 !important;
  color: #fff !important;
  text-decoration: none;
  line-height: 1.25;
  white-space: nowrap;
}

body > header .global-menu a:hover,
body > header.site-header .global-menu a:hover {
  color: #bbf7d0 !important;
}

body > header .account-status,
body > header.site-header .account-status {
  flex: 0 0 auto;
  margin: 0 !important;
  white-space: nowrap;
  cursor: pointer;
}

body > header .account-menu,
body > header.site-header .account-menu {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

body > header .account-dropdown,
body > header.site-header .account-dropdown {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15,23,42,.22);
}

body > header .account-menu.open > .account-dropdown,
body > header.site-header .account-menu.open > .account-dropdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body > header .account-dropdown-link,
body > header.site-header .account-dropdown-link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 9px !important;
  border-radius: 6px;
  background: #16a34a !important;
  color: #fff !important;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

body > header .account-dropdown-link:hover,
body > header.site-header .account-dropdown-link:hover {
  background: #15803d !important;
}

body > header .account-dropdown .push-notification-box,
body > header.site-header .account-dropdown .push-notification-box {
  width: 100%;
  box-sizing: border-box;
  margin: 0 !important;
  border: 0;
  padding: 0;
  background: transparent !important;
  box-shadow: none;
}

body > header .account-dropdown .push-notification-button,
body > header.site-header .account-dropdown .push-notification-button {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 9px;
  text-align: center;
}

/* Tydlig kontrast för rutan där användaren aktiverar push-notiser. */
body > header .push-notification-box,
body > header.site-header .push-notification-box {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc !important;
  color: #0b1f3a !important;
  font-size: 12px;
  line-height: 1.25;
}

body > header .push-notification-box .ios-push-install-hint,
body > header.site-header .push-notification-box .ios-push-install-hint {
  box-sizing: border-box;
  width: 100%;
  max-width: 320px;
  margin: 0 !important;
  padding: 9px 11px;
  border: 1px solid #86efac;
  border-radius: 7px;
  background: #ecfdf5;
  color: #14532d;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body > header .push-notification-box .push-notification-button,
body > header.site-header .push-notification-box .push-notification-button {
  align-self: center;
}

body > header .push-notification-button,
body > header.site-header .push-notification-button {
  border: 0;
  border-radius: 6px;
  padding: 6px 9px;
  background: #16a34a !important;
  color: #fff !important;
  font-weight: 700;
  cursor: pointer;
}

body > header .push-notification-button:hover,
body > header.site-header .push-notification-button:hover {
  background: #15803d !important;
}

body > header .push-notification-button:disabled,
body > header.site-header .push-notification-button:disabled {
  background: #16a34a !important;
  color: #fff !important;
  opacity: 1 !important;
  cursor: default;
}

body > header .push-notification-status,
body > header.site-header .push-notification-status {
  color: #334155 !important;
}

body > header .menu-toggle,
body > header.site-header .menu-toggle {
  display: none;
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid rgba(255,255,255,.35);
  background: transparent;
  color: #fff;
  border-radius: 7px;
  padding: 8px 11px;
  font: inherit;
  cursor: pointer;
}

.site-floating-back {
  display: none;
  position: fixed;
  left: 16px;
  bottom: 24px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  padding: 0 0 3px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: #0b1f3a;
  box-shadow: 0 3px 12px rgba(15,23,42,.22);
  font: 32px/1 Arial,sans-serif;
  cursor: pointer;
}

.site-floating-back:hover { background: #f0fdf4; color: #166534; }

@media (max-width: 900px) {
  body > header,
  body > header.site-header { padding: 12px 16px !important; }
  body > header .nav,
  body > header.site-header .nav { gap: 12px; }
  body > header .logo,
  body > header.site-header .logo { width: 196px; height: 43px; }
  body > header .menu-toggle,
  body > header.site-header .menu-toggle { display: inline-flex !important; align-items: center; gap: 7px; }
  body > header .global-menu,
  body > header.site-header .global-menu {
    display: none !important;
    flex: 1 0 100%;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    padding-top: 8px;
  }
  body > header .nav.menu-open .global-menu,
  body > header.site-header .nav.menu-open .global-menu { display: flex !important; }
  body > header .global-menu a,
  body > header.site-header .global-menu a { white-space: normal; width: 100%; }
  body > header .push-notification-box,
  body > header.site-header .push-notification-box { box-sizing: border-box; width: 100%; max-width: 100%; justify-content: flex-start; margin-top: 4px !important; }
  body > header .account-menu,
  body > header.site-header .account-menu { width: 100%; flex-wrap: wrap; }
  body > header .account-dropdown,
  body > header.site-header .account-dropdown { position: static; width: 100%; min-width: 0; margin-top: 8px; padding: 0; background: transparent; box-shadow: none; }
  body > header .account-menu.open > .account-dropdown,
  body > header.site-header .account-menu.open > .account-dropdown { display: flex; }
  body > header .account-dropdown-link,
  body > header.site-header .account-dropdown-link { color: #fff !important; }
  body > header .push-notification-box .ios-push-install-hint,
  body > header.site-header .push-notification-box .ios-push-install-hint { width: 100%; max-width: 100%; }
  .site-floating-back { display: block; }
}
