@import "settings.colors";
@import "settings.fonts";
@import "settings.z-index";

@import "mixins/tools.functions";
@import "mixins/tools.mixins";

.c-site-header__top {
  background-color: $color-grey-700;
}
.c-site-header__benefits {
  display: none; // hidden on mobile
  overflow: hidden;
  background-color: #724b3f;
  height: rem(102);
  border-bottom: rem(2) solid #412016;
  transition: height 0.4s ease, padding 0.4s ease;

  .c-spinner {
    margin-top: rem(20);
  }
}
// prevent the TGAM logo from overlapping onto the first card
.c-site-header--article {
  .c-site-header__benefits {
    height: rem(112);
  }
}
.c-site-header {
  .c-site-header__benefits--hiding {
    height: 0; // collapsed by default
    border-bottom: none;
  }
}
.c-site-header__bottom {
  background-color: $color-grey-800;
}
.c-site-header__top-content,
.c-site-header__bottom-content {
  margin-left: auto;
  margin-right: auto;
}
.c-site-header__top-content {
  padding-left: rem(2);
  padding-right: rem(2);
  color: $color-white;
  display: flex;
  align-items: center;
  justify-content: stretch;
}
.c-site-header__logo-link {
  min-width: rem(60);
  width: rem(60);
  height: rem(60);
  display: block;
}
.c-site-header__logo-art {
  width: 100%;
  height: 100%;
}
.c-site-header__buttons {
  flex: 1 1 auto;
}
.c-site-header__button-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  .c-button {
    white-space: nowrap;
    margin-right: rem(10);
    &:first-child {
      margin-left: rem(20);
    }
    &:last-child {
      margin-right: 0;
    }
  }
  // Special display requirements for this particular button
  .c-button--adchoices {
    padding-left: rem(9);
    padding-right: rem(9);
    .c-button__icon {
      margin-right: 0;
    }
    .c-button__text {
      @include visually-hidden;
    }
  }
}

// Sticky/pinned header styles

.c-site-header__placeholder {
  display: none;
}
.c-site-header--sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: $z-index-site-header-sticky;
  + .c-site-header__placeholder {
    display: block;
  }
}

// Menu panel

.c-site-header__menu-panel {
  width: 100%;
  margin: 0 auto;
  position: fixed;
  left: 0;
  right: 0;
  z-index: $z-index-site-header-menu-panel;
}
.c-site-header__menu-panel--hiding {
  // animation: c-site-header-hide-menu-panel 0.25s linear 0s 1 normal forwards;
  // animation-play-state: running;
  //
  // NOTE: Until WaPo fixes an issue with PageBuilder's uglifier where
  // it strips the "s" from "0s", we have to write out the individual,
  // long-hand animation properties and omit "animation-delay". This
  // only works because the default value for "animation-delay" is "0s".
  animation-name: c-site-header-hide-menu-panel;
  animation-duration: 0.25s;
  animation-timing-function: linear;
  // animation-delay: 0s;
  animation-iteration-count: 1;
  animation-direction: normal;
  animation-fill-mode: forwards;
  animation-play-state: running;
}
.c-site-header__menu-panel--revealing {
  // animation: c-site-header-reveal-menu-panel 0.25s linear 0s 1 normal forwards;
  // animation-play-state: running;
  animation-name: c-site-header-reveal-menu-panel;
  animation-duration: 0.25s;
  animation-timing-function: linear;
  // animation-delay: 0s;
  animation-iteration-count: 1;
  animation-direction: normal;
  animation-fill-mode: forwards;
  animation-play-state: running;
}
@keyframes c-site-header-hide-menu-panel {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes c-site-header-reveal-menu-panel {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
