/* Shared responsive controls used across the iDuomo site. */

@media screen and (max-width: 991px) {
  .navigation-bar .container {
    width: 100%;
    max-width: none;
    align-items: center;
    padding-left: 12px;
    padding-right: 12px;
  }

  .navigation-bar .navigation-menu.w-nav-menu {
    position: static;
    float: none;
    display: flex !important;
    align-items: center;
    margin-left: auto;
    background-color: transparent;
  }

  .navigation-bar .navigation-link,
  .navigation-bar .navigation-link.w--current {
    display: block;
    color: #676770;
    padding: 25px 12px 16px;
    font-size: 16px;
    line-height: 20px;
    white-space: nowrap;
  }

  .navigation-bar .navigation-link:hover {
    color: #2e9dff;
  }

  .navigation-bar .navigation-link.w--current {
    color: #4075a5;
  }

  .navigation-bar .hamburger-button {
    display: none !important;
  }
}

/* Keep the Chatbase launcher and open panel near the upper-right on desktop
   and wide landscape displays. Mobile and portrait tablet positioning remains
   controlled by Chatbase. */
@media screen and (min-width: 1200px),
       screen and (min-width: 992px) and (orientation: landscape) {
  #chatbase-bubble-button {
    top: 108px !important;
    right: 24px !important;
    bottom: auto !important;
  }

  #chatbase-message-bubbles {
    top: 174px !important;
    right: 24px !important;
    bottom: auto !important;
  }

  #chatbase-bubble-window {
    top: 174px !important;
    right: 24px !important;
    bottom: auto !important;
    height: calc(100vh - 198px) !important;
    max-height: 720px !important;
  }
}

.back-to-top {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: rgba(16, 31, 67, .94);
  box-shadow: 0 6px 18px rgba(16, 31, 67, .22);
  color: #fff;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease,
              background-color .18s ease;
}

.back-to-top::before {
  content: '\2191';
  font-size: 17px;
  line-height: 1;
}

body.has-scrolled .back-to-top {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #2f7eb5;
  color: #fff;
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(47, 126, 181, .32);
  outline-offset: 3px;
}

@media screen and (max-width: 479px) {
  .navigation-bar .container {
    padding-left: 6px;
    padding-right: 6px;
  }

  .navigation-bar .brand-link {
    padding-left: 0;
  }

  .navigation-bar .navigation-link,
  .navigation-bar .navigation-link.w--current {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 14px;
  }

  .back-to-top {
    left: 12px;
    bottom: 12px;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}
