.webapp-bottom-nav,
.webapp-menu-overlay,
.webapp-search-overlay {
  display: none;
}

@media (display-mode: standalone) {
  body {
    padding-bottom: 120px;
  }

  .webapp-bottom-nav {
    display: flex;
  }
}

@supports (-webkit-touch-callout: none) {
  body.is-ios-webapp {
    padding-bottom: 120px;
  }

  body.is-ios-webapp .webapp-bottom-nav {
    display: flex;
  }
}

.webapp-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 76px;
  background: #ffffff;
  border-top: 1px solid #eef0f2;
  justify-content: space-around;
  align-items: center;
  z-index: 9999;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 16px rgba(0,0,0,0.05);
}

.webapp-nav-item {
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  border: 0 !important;
  text-decoration: none;
  color: #b7bcc3;
  font-size: 13px;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  min-height: 56px;
  cursor: pointer;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.webapp-nav-item *,
.webapp-nav-item:focus,
.webapp-nav-item:active,
.webapp-nav-item:focus-visible,
.webapp-nav-item:focus-within,
.webapp-menu-overlay a,
.webapp-menu-overlay a:focus,
.webapp-menu-overlay a:active,
.webapp-menu-overlay a:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
  -webkit-tap-highlight-color: transparent !important;
}

.webapp-nav-icon svg {
  width: 28px;
  height: 28px;
  display: block;
  fill: currentColor;
}

.webapp-nav-item:hover,
.webapp-nav-item.is-active,
.webapp-nav-item[aria-current="page"] {
  color: #111827;
}

.webapp-menu-overlay,
.webapp-search-overlay {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 96px;
  background: #ffffff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  z-index: 2147483647;
}

body.webapp-menu-open .webapp-menu-overlay {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.webapp-search-open .webapp-search-overlay {
  display: block;
}

.webapp-menu-overlay a,
.webapp-search-result {
  text-decoration: none;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 12px;
  border-radius: 12px;
  background: #f8fafc;
  display: block;
}

.webapp-menu-overlay a:hover,
.webapp-search-result:hover {
  background: #eef2f7;
}

.webapp-search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.webapp-search-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
  outline: none;
}

.webapp-search-close {
  border: 0;
  background: #111827;
  color: #ffffff;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  cursor: pointer;
}

.webapp-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.webapp-search-empty {
  color: #6b7280;
  font-size: 14px;
  padding: 8px 4px;
}

/* Skjul Cookiebot i webapp */

@media (display-mode: standalone) {
  #CybotCookiebotDialog,
  .CookiebotWidget,
  #CookiebotWidget {
    display: none !important;
  }
}

body.is-ios-webapp #CybotCookiebotDialog,
body.is-ios-webapp .CookiebotWidget,
body.is-ios-webapp #CookiebotWidget {
  display: none !important;
}

/* HubSpot Customer Agent / Chat */

@media (display-mode: standalone) {
  #hubspot-messages-iframe-container,
  div[id^="hubspot-messages-iframe-container"] {
    bottom: 95px !important;
    max-height: calc(100dvh - 170px) !important;
  }

  #hubspot-messages-iframe-container iframe,
  div[id^="hubspot-messages-iframe-container"] iframe {
    max-height: calc(100dvh - 170px) !important;
  }
}

body.is-ios-webapp #hubspot-messages-iframe-container,
body.is-ios-webapp div[id^="hubspot-messages-iframe-container"] {
  bottom: 95px !important;
  max-height: calc(100dvh - 170px) !important;
}

body.is-ios-webapp #hubspot-messages-iframe-container iframe,
body.is-ios-webapp div[id^="hubspot-messages-iframe-container"] iframe {
  max-height: calc(100dvh - 170px) !important;
}