@import "./variables.scss";
@import "./typography.scss";
@import "./mixins.scss";

// button variant classes
.mat-mdc-button.mat-mdc-button-base {
  &.mat-primary-button,
  &.mat-secondary-button,
  &.mat-tertiary-button,
  &.mat-text-button {
    min-width: 103px;
    width: auto;
    min-height: 40px;
    height: auto;
    border-radius: 3px;
    text-align: center;
    padding: 0.625em 1.5em;
    border: none;
    @include set-font-style(
      $ieeesa-font-calibri-bold,
      $ieeesa-font-style-normal,
      $ieeesa-font-wt-700,
      $ieeesa-font-size-16,
      $ieeesa-line-height-20,
      $ieeesa-black,
      $ieeesa-letter-space-point-1
    );
  }
  & > .mat-icon {
    margin-right: 11px;
  }
  &.mat-primary-button {
    background-color: $ieeesa-primary-btn-active;
    color: $ieeesa-white;
  }
  &.mat-primary-button:focus {
    background: $ieeesa-primary-btn-focus;
  }
  &.mat-primary-button:hover {
    background-color: $ieeesa-primary-btn-hover;
  }
  &.mat-primary-button:active {
    background-color: $ieeesa-primary-btn-active;
  }
  &.mat-primary-button:disabled {
    background-color: $ieeesa-primary-btn-disabled;
  }

  &.mat-secondary-button {
    color: $ieeesa-white;
    background: $ieeesa-medium-grey;
    box-shadow: $ieeesa-box-shadow-2;
  }
  &.mat-secondary-button:hover {
    background: $ieeesa-secondary-btn-hover;
  }
  &.mat-secondary-button:focus {
    background: $ieeesa-secondary-btn-focus;
  }
  &.mat-secondary-button:active {
    background: $ieeesa-secondary-btn-active;
  }
  &.mat-secondary-button:disabled {
    background: $ieeesa-primary-btn-disabled;
    color: $ieeesa-background-dark-color;
    opacity: $ieeesa-opacity-point-38;
  }

  &.mat-tertiary-button {
    background-color: $ieeesa-white;
    border: 1px solid $ieeesa-tertiary-btn-color;
    color: $ieeesa-tertiary-btn-color;
  }
  &.mat-tertiary-button:hover {
    background-color: $ieeesa-tertiary-btn-hover;
  }
  &.mat-tertiary-button:focus {
    background-color: $ieeesa-secondary-btn-focus;
  }
  &.mat-tertiary-button:active {
    background: $ieeesa-tertiary-btn-active;
  }
  &.mat-tertiary-button:disabled {
    border: 1px solid $ieeesa-tertiary-btn-disabled;
    color: $ieeesa-background-dark-color;
    opacity: $ieeesa-opacity-point-38;
  }

  &.mat-text-button {
    color: $ieeesa-blue;
    &:hover {
      background: $ieeesa-tertiary-btn-hover;
    }
    &:active {
      background: $ieeesa-tertiary-btn-hover;
    }
    &:disabled {
      color: $ieeesa-title-color;
      opacity: $ieeesa-opacity-point-38;
    }
  }
}
.ieeesa-text-button {
  color: $ieeesa-outline-variant;
  background: none;
  border: none;
}
.ieeesa-view-more-or-less-button {
  border: none;
  background: none;
  text-decoration: underline;
  color: $ieeesa-blue;
}
.flex-align-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
// mat-toggle-button theme
.mat-button-toggle-checked {
  background-color: $ieeesa-secondary-btn-hover;
  .mat-button-toggle-label-content::before {
    font-family: "Font Awesome 5 Free";
    font-weight: $ieeesa-font-wt-900;
    content: "\f00c";
    padding-right: 0.5625em;
  }
}
.mat-button-toggle-group {
  .mat-button-toggle-label-content {
    @include set-font-style(
      $ieeesa-font-calibri-bold,
      $ieeesa-font-style-normal,
      $ieeesa-font-wt-700,
      $ieeesa-font-size-16,
      $ieeesa-line-height-20,
      $ieeesa-background-dark-color,
      $ieeesa-letter-space-point-1
    );
  }
}
// Bordered button with no background
.no-bg-color-btn {
  color: $ieeesa-blue;
  border-radius: 3px;
  border: 1px solid $ieeesa-blue;
  min-height: 40px;
  height: auto;
}
@media (max-width: 768px) {
  .mat-button-toggle-group {
    .mat-button-toggle-label-content {
      max-width: 8ch;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
      position: relative;
    }
  }
}
.cdk-overlay-pane {
  .mat-mdc-tooltip .mdc-tooltip__surface {
    color: #525252;
    padding: 6px 12px;
    font-family: $ieeesa-font-calibri-regular;
    font-size: $ieeesa-font-size-16;
    border: 1px solid $ieeesa-outline-variant;
    background: $ieeesa-white;
    box-shadow: $ieeesa-box-shadow-11;
    max-width: unset !important;
  }
}
.cdk-overlay-pane {
  .mat-mdc-option .mdc-list-item__primary-text {
    font-family: $ieeesa-font-calibri-regular !important;
  }
}
// Modal component styles
.cdk-overlay-pane {
  &.ieeesa-modal-confirm-dialog,
  &.ieeesa-modal-dialog,
  &.ieeesa-alert-dialog {
    width: 100%;
    min-width: 312px;
  }
}

.mat-mdc-form-field {
  @include set-font-style(
    $ieeesa-font-calibri-regular,
    $ieeesa-font-style-normal,
    $ieeesa-font-wt-400,
    $ieeesa-font-size-16,
    $ieeesa-line-height-24,
    $ieeesa-on-surface-variant-color,
    $ieeesa-letter-space-point-5
  );
}
.ieeesa-cancel-modal-confirm-dialog {
  width: 25vw !important;
  .ieeesa-confirmation {
    padding: 1.5em 1.5em 1em 1.5em;
    .mat-mdc-dialog-content {
      text-align: center;
      padding: 0 0 1em 0 !important;
    }
  }
}
.mat-mdc-button,
.mat-mdc-outlined-button {
  --mat-mdc-button-persistent-ripple-color: unset;
}
@media (max-width: 768px) {
  .ieeesa-cancel-modal-confirm-dialog {
    width: 90vw !important;
  }
}
.ieeesa-wrapper-border {
  border: 1px solid $ieeesa-border-blue;
  border-top: none;
  padding: 1.5em;
  border-radius: 0px 0px 4px 4px;
}
