/*
 * Black Rose sticky storefront header
 * Keeps the burgundy header and white store navigation together while scrolling.
 */

:root {
  --br-sticky-main-height: 0px;
  --br-sticky-menu-height: 0px;
  --br-sticky-shadow: 0 12px 30px rgba(55, 7, 27, 0.14);
}

#br-main-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  width: 100%;
  z-index: 1080 !important;
  margin: 0 !important;
  isolation: isolate;
}

#br-store-menu {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: var(--br-sticky-main-height) !important;
  width: 100%;
  z-index: 1070 !important;
  margin-top: 0 !important;
  background: #fff;
  transition: box-shadow 180ms ease;
}

body.br-sticky-header-scrolled #br-main-header {
  box-shadow: 0 8px 22px rgba(55, 7, 27, 0.12);
}

body.br-sticky-header-scrolled #br-store-menu {
  box-shadow: var(--br-sticky-shadow);
}

html {
  scroll-padding-top: calc(
    var(--br-sticky-main-height) + var(--br-sticky-menu-height) + 16px
  );
}

.br-go-to-top {
  position: fixed;
  right: 22px;
  bottom: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
  color: #fff;
  background: #97123d;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(105, 7, 42, 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  pointer-events: none;
  z-index: 1060;
  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.br-go-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.br-go-to-top:hover,
.br-go-to-top:focus-visible {
  color: #fff;
  background: #6f092d;
  box-shadow: 0 13px 30px rgba(105, 7, 42, 0.4);
  outline: none;
}

.br-go-to-top:focus-visible {
  outline: 3px solid rgba(151, 18, 61, 0.28);
  outline-offset: 3px;
}

.br-go-to-top .fa {
  font-size: 27px;
  line-height: 1;
  transform: translateY(-1px);
}

.br-go-to-top__label {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  display: block;
  width: max-content;
  max-width: 130px;
  padding: 7px 10px;
  color: #fff;
  background: #441020;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translate(5px, -50%);
  transition:
    opacity 160ms ease,
    visibility 160ms ease,
    transform 160ms ease;
  white-space: nowrap;
  pointer-events: none;
}

.br-go-to-top__label::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  border: 5px solid transparent;
  border-left-color: #441020;
  transform: translateY(-50%);
}

.br-go-to-top:hover .br-go-to-top__label,
.br-go-to-top:focus-visible .br-go-to-top__label {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

@media (max-width: 767px) {
  .br-go-to-top {
    right: 16px;
    bottom: 94px;
    width: 44px;
    height: 44px;
  }

  .br-go-to-top .fa {
    font-size: 24px;
  }

  .br-go-to-top__label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #br-store-menu,
  .br-go-to-top,
  .br-go-to-top__label {
    transition: none;
  }
}
