/** ******************************* **/
/** BLOCK HEADER **/
/** ******************************* **/

.pip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 28px;
}

/** ******************************* **/
/** ELEMENT LOGO **/
/** ******************************* **/

.pip-header__logo {
  flex-shrink: 1;
  flex-grow: 0;
  align-self: center;
}

.pip-header__logo img {
  height: auto;
  width: 100%;
  min-width: 100px;
  max-width: 140px;
}

/** ******************************* **/
/** ELEMENT MENU **/
/** ******************************* **/

.pip-header__menu {
  flex-shrink: 0;
  flex-grow: 0;
}

.pip-header__menu .dslc-navigation-arrow {
  display: none;
}

.pip-header__menu > div > ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 12px;
}

.pip-header__menu > div > ul > li.menu-item {
  padding: 12px;
  position: relative;
}

.pip-header__menu > div > ul > li.menu-item a {
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0 7px 7px 7px;
  text-decoration: none;
  border-bottom: 5px solid var(--fmcsv-color-yellow);
  line-height: 24px;
  font-family: var(--fmcsv-font-regular), sans-serif;
  font-weight: bold;
  font-size: 16px;
  color: #1e1d36;
  display: inline-block;
}

.pip-header__menu ul.sub-menu {
  z-index: 3;
  display: none;
  position: absolute;
  flex-direction: column;
  min-width: 200px;
  transition: opacity .6s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: inset 0 1px 0 rgba(255,255,255, 0.8), 0 2px 1px rgba(0, 0, 0, 0.15), 3px 5px 10px rgba(0, 0, 0, 0.19);
  background-color: #fff;
  border-radius: 4px;
  left: 0 !important;
  right: auto;
  padding-top: 5px
}

.pip-header__menu > div > ul > li.menu-item a:hover {
  border-bottom-color: var(--fmcsv-color-red);
}

.pip-header__menu > div > ul > li.menu-item:hover ul.sub-menu {
  display: flex;
}

.pip-header__menu ul.sub-menu > li.menu-item {
  padding: 6px 10px;
  border-color: #ededed;
  border-width: 1px;
  border-bottom: 1px solid #ededed;
  flex: 1;
}

.pip-header__menu ul.sub-menu > li.menu-item > a {
  font-size: 15px;
  line-height: 21px;
  font-weight: 300;
  font-family: 'Roboto', sans-serif;
  text-transform: none;
  width: 100%;
}

.pip-header__menu ul.sub-menu > li.menu-item:hover {
  background-color: #56aee3;
}

/** ******************************* **/
/** ELEMENT SEARCH **/
/** ******************************* **/

.pip-header__search {
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: 240px;
}

/** ******************************* **/
/** ELEMENT SEARCH MOBILE **/
/** ******************************* **/

.pip-header__search-mobile {
  display: none;
}

.pip-header__search-mobile svg {
  stroke: rgb(23, 22, 43);
}

.pip-header__search-mobile svg:hover {
  stroke:  #3a3a6e;
  cursor: pointer;
}

/** ******************************* **/
/** BLOCK HEADER - RESPONSIVE RULES **/
/** ******************************* **/

@media only screen and (min-width: 1020px) and (max-width: 1180px) {
  .pip-header__menu > div > ul > li.menu-item {
    padding: 6px;
  }

  .pip-header__menu > div > ul > li.menu-item a {
    padding: 0 4px 7px 4px;
    font-size: 14px;
  }
}

@media only screen and (min-width: 940px) and (max-width: 1020px) {
  .pip-header__menu > div > ul > li.menu-item {
    padding: 2px;
  }

  .pip-header__menu > div > ul > li.menu-item a {
    padding: 0 3px 7px 3px;
    font-size: 13px;
  }
}

@media only screen and (max-width: 940px) {
  .pip-header {
    gap: 40px;
  }

  .pip-header__menu {
    display: none;
  }

  .pip-header__search {
    flex-grow: 1;
  }

  .pip-header__search-mobile {
    display: flex;
  }
}

@media only screen and (max-width: 520px) {
  .pip-header {
    gap: 12px;
    min-width: 316px;
  }

  .pip-header__search {
    flex-shrink: 1;
  }
}

/** ******************************* **/
/** BLOCK SIDEBAR **/
/** ******************************* **/

.pip-mobile-sidebar {
  background-color: var(--fmcsv-color-blue);
  box-shadow: 0 0 10px #85888c;
  height: 100%;
  max-width: 80%;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 100;
  /* Start the sidebar hidden using transform because animations with transform are better than width*/
  transform: scaleX(0);
  transform-origin: top right;
  width: 280px;
}

/** ******************************* **/
/* ** MODIFIERS ** */
/** ******************************* **/

.pip-mobile-sidebar--on {
  transform: scaleX(1);
  transition: transform 0.2s ease-out;
}

/* This is a trick because if we put transition in default element, it appear by the animation time on page load */
.pip-mobile-sidebar--off {
  transform: scaleX(0) !important;
  transition: transform 0.2s ease-out;
}

/** ******************************* **/
/** ELEMENT NAV **/
/** ******************************* **/

.pip-mobile-sidebar__nav {
}

.pip-mobile-sidebar__nav .dslc-navigation-arrow {
  display: none;
}

.pip-mobile-sidebar__nav .menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px;
}

.pip-mobile-sidebar__nav .menu > .menu-item .sub-menu.sub-menu--on {
  display: flex;
}

.pip-mobile-sidebar__nav .menu-item a {
  font-family: var(--font-family-eesti-regular), 'sans-serif';
  line-height: 1.3em;
  color: white !important;
  text-decoration: none !important;
}

.pip-mobile-sidebar__nav .menu > .menu-item a {
  font-size: 28px;
}

.pip-mobile-sidebar__nav .sub-menu {
  padding-top: 8px;
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-left: 16px;
}

.pip-mobile-sidebar__nav .sub-menu > .menu-item a {
  font-size: 18px;
}

/** ******************************* **/
/** ELEMENT CLOSE **/
/** ******************************* **/

.pip-mobile-sidebar__close {
  position: absolute;
  right: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background-color: #272644;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}