/* ==== 
 --------- (3.01) buttons styles start ---------
 ==== */

// mixins
@use "../abstracts/mixins" as *;
// variables
@use "../abstracts/variables" as *;

.btn-wrapper {
  display: inline-block;
  position: relative;
  z-index: 1;
  margin-inline-end: 10px;
  margin-block-end: 10px;

  &::before {
    content: "";
    position: absolute;
    top: 10px;
    right: -10px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--black);
    border-radius: 5px;
    background-color: var(--primary-color);
    transition: var(--transition);
    z-index: -1;
    pointer-events: none;
  }

  .btn--primary {
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
    font-family: var(--dynapuff);
    text-transform: uppercase;
    padding: 23px 50px;
    background-color: var(--primary-color);
    color: #0d1c34;
    border: 2px solid var(--black);
    border-radius: 5px;
    position: relative;
    z-index: 1;
    overflow: hidden;

    &::before,
    &::after {
      content: "";
      position: absolute;
      top: 0px;
      bottom: 0px;
      inset-inline-start: 0px;
      width: 50%;
      height: 100%;
      border-radius: 0px;
      background-color: var(--white);
      transition: var(--transition);
      z-index: -1;
    }

    &::after {
      inset-inline-start: unset;
      inset-inline-end: 0px;
    }
  }

  &:hover {
    .btn--primary {
      &::before,
      &::after {
        width: 0%;
      }
    }

    &::before {
      top: 0px;
      right: 0px;
    }
  }
}

.btn-wrapper {
  .btn--secondary {
    font-size: 18px;
    line-height: 1;
    font-weight: 600;
    font-family: var(--gorditas);
    text-transform: uppercase;
    padding: 19px 50px;
    background-color: var(--primary-color);
    color: #0d1c34;
    border: 2px solid var(--black);
    border-radius: 5px;
    position: relative;
    z-index: 1;
    overflow: hidden;

    &::before,
    &::after {
      content: "";
      position: absolute;
      top: 0px;
      bottom: 0px;
      inset-inline-start: 0px;
      width: 50%;
      height: 100%;
      border-radius: 0px;
      background-color: var(--secondary-color);
      transition: var(--transition);
      z-index: -1;
    }

    &::after {
      inset-inline-start: unset;
      inset-inline-end: 0px;
    }
  }

  &:hover {
    .btn--secondary {
      &::before,
      &::after {
        width: 0%;
      }
    }
  }
}

/* ==== 
 --------- (3.01) buttons styles end ---------
 ==== */
