$blue1: #004c9f !default;
$blue2: #005fc6 !default;
$blue3: #0e7dec !default;
$blue4: #459fff !default;
$blue5: #73b7ff !default;
$blue6: #dfefff !default;

$green1: #0a6640 !default;
$green2: #0d8050 !default;
$green3: #0f9960 !default;
$green4: #15b371 !default;
$green5: #3dcc91 !default;
$green6: #e1f7ed !default;

$pt-grid-size: 8px;

$pt-font-size: $pt-grid-size * 1.75 !default;
$pt-font-size-large: $pt-grid-size * 2 !default;
$pt-font-size-small: $pt-grid-size * 1.5 !default;

@import "@blueprintjs/core/src/blueprint.scss";

:focus {
  outline: 0;
}

:focus-visible {
  @include focus-outline();
}

.bp5-button {
  box-shadow: inset 0px -1px 1px rgba(16, 22, 26, 0.1) !important;
  padding: 6px 12px;
  height: 30px;
}

.bp5-button.bp5-minimal {
  box-shadow: none !important;
}

.bp5-input {
  border: 1px solid $light-gray1 !important;
  box-shadow: none;
  height: 34px;
}

.bp5-input:focus {
  border: 2px solid $pt-intent-primary !important;
  box-shadow: none;
}

.bp5-input.bp5-intent-danger,
.bp5-intent-danger .bp5-input {
  box-shadow: none;
  border: 2px solid $pt-intent-danger !important;
}

.bp5-input-group.bp5-intent-danger .bp5-input {
  box-shadow: none;
}

.bp5-input-group .bp5-input-action,
.bp5-input-group > .bp5-input-left-container,
.bp5-input-group > .bp5-button,
.bp5-input-group > .bp5-icon {
  position: absolute;
  top: $pt-grid-size;
}

.bp5-dialog {
  max-width: unset;
  width: unset;
  background-color: white;
  padding: 20px;
  box-shadow:
    0px 0px 0px rgba(16, 22, 26, 0.1),
    0px 4px 8px rgba(16, 22, 26, 0.2),
    0px 18px 46px rgba(16, 22, 26, 0.2);
  border-radius: 6px;
}

.bp5-dialog-header {
  box-shadow: none;
}

.bp5-dialog-header .bp5-heading {
  line-height: normal;
}

.bp5-tag {
  padding: 2px 6px;
  background: $gray1;
  .bp5-minimal {
    background: $gray5;
    color: $black;
  }
  .bp5-intent-success {
    background: $green3;
    .bp5-minimal {
      color: $blue2;
      background: $green6;
    }
  }
  .bp5-intent-primary {
    background: $blue3;
    .bp5-minimal {
      color: $blue2;
      background: $blue6;
    }
  }
}

// Temp fix for checkbox
// https://github.com/palantir/blueprint/issues/2821#issuecomment-414645690
.bp5-control.bp5-checkbox input:checked ~ .bp5-control-indicator:before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0 0 12 5z' fill='rgba(255,255,255,1)'/%3E%3C/svg%3E");
}

// Remove box shadow and vertical separators on HTMLTable cells when bordered prop is present
table.bp5-html-table.bp5-html-table-bordered {
  tbody tr td,
  th,
  tbody tr td:not(:first-of-type),
  th:not(:first-of-type) {
    box-shadow: none;
  }
}
