@layer components {
  .btn {
    letter-spacing: 1.5px;
    text-align: center;
    leading-trim: both;
    text-edge: cap;
    font-family: theme('fontFamily.heading');
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    appearance: none;
    border: 1px solid theme('colors.black');
    background-color: theme('colors.black');
    padding: 17px 28px;
    text-transform: capitalize;
    color: white;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    outline: none !important;
    text-transform: uppercase;

    &:hover,
    &:focus {
      background-color: white;
      color: black;
    }

    &.light {
      background-color: theme('colors.grayLight') !important;
      color: theme('colors.black') !important;
      border-color: theme('colors.grayLight') !important;
      &:hover {
        background-color: theme('colors.black') !important;
        color: theme('colors.grayLight') !important;
        border-color: theme('colors.black') !important;
      }
      &:after {
        background-color: theme('colors.black') !important;
      }
      &.btn-underline {
        background-color: transparent !important;
        &:hover {
          color: theme('colors.black') !important;
        }
      }
    }
    &.dark {
      background-color: theme('colors.black') !important;
      color: theme('colors.grayLight') !important;
      &:hover {
        background-color: theme('colors.white') !important;
        color: theme('colors.black') !important;
      }
      &:after {
        background-color: theme('colors.white') !important;
      }
      &.btn-underline {
        background-color: transparent !important;
        &:hover {
          color: theme('colors.white') !important;
        }
      }
    }
  }

  .btn-underline {
    padding: 5px 0 !important;
    background-color: transparent !important;
    border: none !important;
    position: relative;
    text-transform: uppercase;
    font-size: 8px !important;

    &:after {
      content: '';
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 1px;
      background-color: theme('colors.black');
      transition: transform 0.5s ease;
      transform-origin: center;
    }
    &:hover {
      &:after {
        transform: scaleX(0.5);
      }
    }
  }
  .arrow_btn {
    @apply flex items-center gap-3;
    .icon {
      height: 1.75rem !important;
      width: 1.75rem !important;
      flex: 0 0 1.75rem !important;
      @apply rounded-full border border-black flex items-center justify-center border-solid;
      transition: all 0.3s ease-out;

      path {
        transition: all 0.3s ease-out;
      }
    }

    .text {
      @apply text-black text-[17px] uppercase tracking-widest;
    }
    &:hover {
      .icon {
        @apply bg-black;
        path {
          fill: theme('colors.white');
        }
      }
      .text {
      }
    }
  }

  .btn-nav-toggler-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: fixed;
    top: 20px;
    right: 15px;
    width: 35px;
    height: 35px;
    z-index: 1;

    &:before {
      content: '';
      position: absolute;
      background-color: theme('colors.white');
      opacity: 0.5;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      @media (min-width: theme('screens.lg')) {
        background-color: transparent;
      }
    }
  }
  .btn-nav-toggler {
    width: 19px;
    height: 0px;
    position: relative;
    top: 0%;
    left: 0%;
    transition: all 0.3s ease;

    .icon {
      transition-duration: 0.5s;
      position: relative;
      background-color: theme('colors.black');
      height: 3.5px;
      width: 19px;

      &:before,
      &:after {
        transition-duration: 0.5s;
        position: absolute;
        background-color: theme('colors.black');
        height: 3.5px;
        width: 19px;

        content: '';
      }

      &:before {
        top: -9px;
        left: 0;
      }

      &:after {
        top: 9px;
        left: 0;
      }
    }

    &:hover {
      cursor: pointer;

      .icon {
        &:before {
          top: -10px;
        }

        &:after {
          top: 10px;
        }
      }
    }
  }

  body.js-menu-open {
    .btn-nav-toggler {
      transform: rotate(90deg);

      .icon {
        background-color: transparent;

        &:before {
          top: 0;
          transform: rotate(45deg);
        }

        &:after {
          top: 0;
          transform: rotate(-45deg);
        }
      }
    }
  }
}
