/*-------------------------- BUTTONS -------------------------*/
/*--- GENERAL STYLES ---*/
.btn,
.btn:link,
.btn:visited {
  cursor: pointer;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  background-color: transparent;
  border: none;
  border-radius: 0.4rem;
  padding: 1.3rem 2.4rem;
  transition: all 0.3s;

  display: inline-flex;
  justify-content: space-between;
  align-items: center;
}

/*--- ICON FOR THE BUTTONS ---*/
.btn--icon {
  width: 2rem;
  height: 2rem;
}

/*--- PRIMARY BUTTON ---*/
/*
1. Primary button generally has the primary background 
and border with a lighter or white content
2. On hover, change the background color, border color to secondary branding 
and translate it vertically with an addition of box-shadow to highlight 
*/
.btn--primary,
.btn--primary:link,
.btn--primary:visited {
  color: var(--color-white);
  background-color: var(--background-primary);
  border: 1px solid var(--color-primary);
}

.btn--primary > .btn--icon {
  fill: var(--color-white);
}

.btn--primary:hover,
.btn--primary:focus {
  background-color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 1rem 4rem rgba(0, 0, 0, 0.07);
}

.btn--primary:focus {
  transform: translateY(-1px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.07);
}

/*--- WHITE OUTLINE BUTTON ---*/
/*
1. Generally, it has a transparent background, light grey border 
with a lighter or white contents
2. On hover, change the background color to the lighter grey and text color to secondary branding
and translate it vertically with an addition of box-shadow to highlight 
*/
.btn--outline-white,
.btn--outline-white:link,
.btn--outline-white:visited {
  color: var(--color-white);
  border: 1px solid var(--border-grey-light);
}

.btn--outline-white:hover,
.btn--outline-white:focus {
  color: var(--color-secondary);
  background-color: var(--background-grey-light);
}

.btn--outline-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 1rem 4rem rgba(0, 0, 0, 0.07);
}

.btn--outline-white:focus {
  transform: translateY(-1px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.07);
}

/*--- SIMPLE BUTTON ---*/
/*
1. Generally, it has a transparent background and a primary color bottom border 
with its content having a primary color
2. On hover, translates the button icon in the horizontal direction
*/
.btn--simple,
.btn--simple:link,
.btn--simple:visited {
  font-size: 1.1rem;
  color: var(--color-primary);
  padding: 0;
  position: relative;
}

.btn--simple > .btn--icon {
  fill: var(--color-primary);
  transition: all 0.3s ease;
}

.btn--simple:hover > .btn--icon {
  transform: translateX(0.5rem);
}

.btn--simple::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  position: absolute;
  top: 100%;
  left: 0;
}

/*--- LARGE BUTTONS ---*/
/*
1. Large buttons can be used in addition to
other button formats to have a larger button shape
*/
.btn--large,
.btn--large:link,
.btn--large:visited {
  padding: 2rem 4rem;
}

@media only screen and (max-width: 27.5em) {
  .btn--large,
  .btn--large:link,
  .btn--large:visited {
    padding: 1.5rem 3rem;
  }
}

/*--- SIDE PANEL TOGGLE MENU BUTTON ---*/
/*
1. Toggle menu button is a humburger shaped icon button 
generally used in smaller devices to toggle the side navigation menu for the application.
*/
.btn--toggle-menu,
.btn--toggle-menu:link,
.btn--toggle-menu:visited {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0;
}

.btn--toggle-menu > .menu-line {
  display: block;
  width: 4rem;
  height: 3px;
  background-color: var(--color-primary);
  transition: all 0.2s;
}

.btn--toggle-menu > .menu-line:not(:first-child):not(:last-child) {
  width: 3rem;
}

.btn--toggle-menu:hover > .menu-line:not(:first-child):not(:last-child),
.btn--toggle-menu:focus > .menu-line:not(:first-child):not(:last-child) {
  width: 4rem;
}

/*--- MODAL CLOSE BUTTON ---*/
/*
1. Generally used in case of modal popups to show the close icon
2. Animates the background color from transparent to light primary branding color on hover
*/
.btn--modal-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  padding: 1.3rem;
  border-radius: 50%;
}

.btn--modal-close > svg.btn--icon {
  width: 3rem;
  height: 3rem;
  fill: var(--color-secondary);
}

.btn--modal-close:hover {
  background-color: var(--background-primary-light);
}

/*-------------------------- BUTTONS -------------------------*/
