@use "./variables" as variables;
@use "./typography";
@use "./color-palette" as color-palette;

@mixin sghbtn() {
  width: 100%;
  height: variables.$sgh-btn-height;
  border-radius: variables.$sgh-btn-border-radius;
  border: none;
  text-transform: uppercase;
  font-weight: variables.$sgh-btn-font-weight;
  color: #fff;
  font-family: variables.$sgh-font-family-primary;
  font-size: variables.$sgh-btn-font-size;
  margin-bottom: variables.$sgh-btn-margin-bottom;
  transition: opacity 0.2s ease-in-out;
  
  &:hover {
    opacity: variables.$sgh-btn-hover-opacity;
    cursor: pointer;
  }
  
  &:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(map-get(color-palette.$sgh-color-palette, 500), 0.2);
  }
  
  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
}

body {
  font-family: variables.$sgh-font-family-primary;
}

.sgh-btn-primary {
  @include sghbtn();
  background-color: color-palette.$sgh-green-primary-lib;
}

.sgh-btn-accent {
  @include sghbtn();
  background-color: color-palette.$sgh-green-accent-lib;
}

.sgh-btn-outline {
  @include sghbtn();
  color: map-get(color-palette.$sgh-color-palette, font_colors, PRIMARY);
  border: 1px solid map-get(color-palette.$sgh-color-palette, font_colors, PRIMARY);
  background-color: #ffffff;
  margin-bottom: 0;
}

.sgh-blue-theme {
  .sgh-btn-primary {
    background-color: color-palette.$sgh-blue-primary-lib;
  }
  .sgh-btn-accent {
    background-color: #40c4ff;
  }
}

.sgh-light-theme {
  .sgh-btn-primary {
    background-color: #2196f3;
  }
  .sgh-btn-accent {
    background-color: #536dfe;
  }
}

.sgh-dark-theme {
  .sgh-btn-primary {
    background-color: #ffffff;
  }
  .sgh-btn-accent {
    background-color: #eeeeee;
  }
}

.natera-theme {
  .sgh-btn-primary {
    background-color: map-get(color-palette.$natera-blue-palette, 500);
    border-radius: variables.$natera-btn-border-radius;
  }
  .sgh-btn-accent {
    background-color: map-get(color-palette.$natera-lightblue-palette, 500);
    border-radius: variables.$natera-btn-border-radius;
  }
  .sgh-btn-outline {
    border-radius: variables.$natera-btn-border-radius;
  }
}

.dialog-wrapper {
  .sgh-btn-primary, .sgh-btn-accent {
    border-radius: 0;
  }
}

