/* Buttons */

/* Primary Button */

.button {
  padding: 15px 20px;
  min-width: 150px;
  height: 48px;
  text-align: left;
  font-size: 0.8750rem;
  background-color: var(--hh-color-night);
  color: #fff;
  border: 1px solid var(--hh-color-night);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
}

.button::after {
  content: '';
  display: inline-block;
  margin-left: 10px;
  font-size: 0.7500rem;
  height: 10px;
  width: 10px;
  border: 1px solid var(--hh-color-day);
  border-radius: 50%;
  transition: 0.25s;
  flex: 0 0 10px;
  position: absolute;
  right: 20px;
}

.button span:first-child,
.button span.slide-in {
  display: block;
  position: relative;
  transition: 0.5s;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover span:first-child {
    transform: translate3d(0, -40px, 0);
    order: 1;
  }
}

.button span.slide-in {
  transform: translate3d(0, 20px, 0);
  order: 3;
  flex: 1 1 100%;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover span.slide-in {
    transform: translate3d(0, -16.5px, 0);
  }

  .button:hover::after {
    background-color: #fff;
  }
}

.button:focus {
  border: 1px solid blue;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (hover: hover) and (pointer: fine) {
  .button:disabled:hover::after {
    background-color: transparent;
  }

  .button:disabled:hover span:first-child {
    transform: translate3d(0, 0, 0);
  }

  .button:disabled:hover span.slide-in {
    transform: translate3d(0, 20px, 0);
  }
}

/* Secondary Button */

.button--secondary {
  padding: 15px 20px;
  min-width: 150px;
  height: 48px;
  text-align: left;
  font-size: 0.8750rem;
  background-color: #fff;
  color: var(--hh-color-night);
  border: none;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
}

.button--secondary::after {
  content: '';
  display: inline-block;
  height: 10px;
  width: 10px;
  border: 1px solid #000;
  border-radius: 50%;
  transition: 0.25s;
  flex: 0 0 10px;
  position: absolute;
  right: 20px;
}

@media (hover: hover) and (pointer: fine) {
  .button--secondary:hover::after {
    background-color: var(--hh-color-night);
  }
}

.button--secondary > span:first-child,
.button--secondary > span.slide-in {
  display: block;
  position: relative;
  transition: 0.5s;
  flex: 1 1 100%;
}

@media (hover: hover) and (pointer: fine) {
  .button--secondary:hover > span:first-child {
    transform: translate3d(0, -40px, 0);
    order: 1;
  }
}

.button--secondary span.slide-in {
  transform: translate3d(0, 20px, 0);
  order: 3;
  flex: 1 1 100%;
  color: #000;
}

@media (hover: hover) and (pointer: fine) {
  .button--secondary:hover span.slide-in {
    transform: translate3d(0, -16.5px, 0);
  }
}

.button--secondary .border-left,
.button--secondary .border-right,
.button--secondary .border-top,
.button--secondary .border-bottom {
  position: absolute;
  background-color: var(--hh-color-brand-tertiary);
  color: #ccc;
}

.button--secondary .border-left::before,
.button--secondary .border-right::before,
.button--secondary .border-top::before,
.button--secondary .border-bottom::before {
  content: '';
  background: var(--hh-color-night);
  display: block;
  position: absolute;
  transition: 0.5s;
  -webkit-backface-visibility: hidden;
}

.button--secondary .border-left {
  left: 0;
  bottom: 0;
  height: 100%;
  width: 1px;
}

.button--secondary .border-left::before {
  bottom: 0;
  left: 0px;
  width: 1px;
  height: 0;
  width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .button--secondary:hover .border-left::before {
    height: 100%;
  }
}

.button--secondary .border-right {
  right: 0;
  bottom: 0;
  height: 100%;
  width: 1px;
}

.button--secondary .border-right::before {
  bottom: 0;
  right: 0px;
  width: 1px;
  height: 0;
}

@media (hover: hover) and (pointer: fine) {
  .button--secondary:hover .border-right::before {
    height: 100%;
  }
}

.button--secondary .border-top {
  top: 0;
  left: 0;
  height: 1px;
  width: 100%;
}

.button--secondary .border-top::before {
  top: -1px;
  left: 0;
  width: 0;
  height: 1px;
}

@media (hover: hover) and (pointer: fine) {
  .button--secondary:hover .border-top::before {
    width: 100%;
  }
}

.button--secondary .border-bottom {
  bottom: 0;
  left: 0;
  height: 1px;
  width: 100%;
}

.button--secondary .border-bottom::before {
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
}

@media (hover: hover) and (pointer: fine) {
  .button--secondary:hover .border-bottom::before {
    width: 100%;
  }
}

.button--secondary:focus {
  border: 1px solid blue;
}

.button--secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (hover: hover) and (pointer: fine) {
  .button--secondary:disabled:hover .border-bottom::before,
  .button--secondary:disabled:hover .border-top::before,
  .button--secondary:disabled:hover .border-right::before,
  .button--secondary:disabled:hover .border-left::before {
    display: none;
  }

  .button--secondary:disabled:hover::after {
    background-color: transparent;
  }
  .button--secondary:disabled:hover span:first-child {
    transform: translate3d(0, 0, 0);
  }
  .button--secondary:disabled:hover span.slide-in {
    transform: translate3d(0, 20px, 0);
  }
}

.button--text-underline {
  font-size: 0.8750rem;
  background-color: transparent;
  border: none;
  padding: 0 0 0px;
  color: var(--hh-color-night);
  height: 27px;
  overflow: hidden;
  position: relative;
}

.button--text-underline::before {
  content: '';
  background: var(--hh-color-night);
  display: block;
  position: absolute;
  bottom: 0;
  left: 0px;
  width: 0px;
  height: 1px;
  width: 100%;
  transition: 0.5s;
  -webkit-backface-visibility: hidden;
}

.button--text-underline span:first-child,
.button--text-underline span.slide-in {
  display: block;
  position: relative;
  transition: 0.5s;
}

.button--text-underline span.slide-in {
  transform: translate3d(0, 20px, 0);
}

@media (hover: hover) and (pointer: fine) {
  .button--text-underline:hover span:first-child {
    transform: translate3d(0, -20px, 0);
  }

  .button--text-underline:hover span.slide-in {
    transform: translate3d(0, -15px, 0);
  }

  .button--text-underline:hover::before {
    width: 0%;
  }
}

.button--text-underline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button--text-underline:focus {
  border: 1px solid blue;
}

@media (hover: hover) and (pointer: fine) {
  .button--text-underline:disabled:hover span:first-child {
    transform: translate3d(0, 0, 0);
  }

  .button--text-underline:disabled:hover span.slide-in {
    transform: translate3d(0, 20px, 0);
  }

  .button--text-underline:disabled:hover::before {
    width: 100%;
  }
}

.add-to-cart-button {
  white-space: nowrap;
}
