/*-------------------
      HEADER
--------------------*/

@media only screen and (max-width: @mobileWidth) {
  .ui.segment.header-wrapper {
    position: sticky !important;
    z-index: 3;
    background: @white;
  }

  .ui.segment {
    position: initial !important;
  }

  .header .logo-nav-wrapper {
    margin: 10px 0 10px;
  }
}

.ui.segment.header-wrapper {
  padding: 0;
}

.ui.segment .header {
  padding: 0 15px;
}

.header .logo-nav-wrapper {
  align-items: center;

  .navigation {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
  }
}

.header .logo-nav-wrapper .ui.pointing.secondary {
  display: flex;
  width: 100%;
  max-width: 100%;
  justify-content: unset;
  margin: 0 !important;

  .navigation-links {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }

  .tools-wrapper {
    display: flex;
    flex: 1 0 auto;
    align-items: center;
  }

  .tools-search-wrapper {
    margin-left: 0;
  }

  .search form {
    padding-top: 0 !important;
  }
}

@media only screen and (max-width: 766px) {
  // #141204 take into account that for the header wrapper on mobile views
  // we have the volto toolbar on top
  .has-toolbar-collapsed .header-wrapper {
    top: 20px;
  }

  .has-toolbar .header-wrapper {
    top: 100px;
  }
}

@media only screen and (min-width: 768px) and (max-width: @mobileWidth) {
  // #141204 use fixed position instead of sticky in order to always
  // have the header on top from 768px to 1279px
  .ui.segment.header-wrapper {
    position: fixed !important;
    top: 0;
  }

  .header-wrapper {
    width: 100%; // when position fixed div behaves as inline
  }

  .has-toolbar .header-wrapper {
    width: calc(100% - 80px); // toolbar width
  }

  .has-toolbar-collapsed .header-wrapper {
    width: calc(100% - 20px);
  }
}

.ui.right.sidebar.metadata-sidebar.menu,
.ui.left.sidebar.metadata-sidebar.menu {
  .ui.header {
    padding: 0;
  }
}
