client/src/components/mapping/style.scss
@import '~@blueprintjs/core/lib/css/blueprint.css';
@import '~@blueprintjs/core/lib/scss/variables';

$window-padding: 20px;
$border-radius: 6px;

body {
  background-color: $black;
  color: $light-gray1;
}

.flex-row {
  display: flex;
  justify-content: center;
}

#tableViewer {
  display: flex;
  flex-direction: column;

  .bp3-control-group {
    align-self: center;
    margin: 15px;
  }
}

.bp3-tab-list {
  background-color: $light-gray1;
  overflow: hidden;

  & > * {
    text-align: center;
    flex-grow: 1;
  }

  .tab-title {
    display: flex;
    align-items: center;
    justify-content: center;

    & > *:first-child {
      margin-right: 5px;
    }
  }
}

.bp3-tab {
  padding: 5px 0px;

  &:focus {
    outline: none;
  }
}

.bp3-tab-indicator-wrapper .bp3-tab-indicator {
  background-color: $light-gray3;
  height: 100%;
}

#mapping-explorer-container {
  width: 100vw;

  #main-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
  }

  #fhir-panel {
    background-color: $dark-gray1;
    color: $light-gray1;
    flex-basis: 25%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;

    #fhir-attributes {
      overflow-y: hidden;
      display: flex;
      flex-direction: column;
    }

    #resource-add {
      background-color: $dark-gray2;
      padding: $window-padding / 2;

      .bp3-form-group,
      .bp3-form-content {
        display: flex;
        justify-content: center;
      }

      .bp3-label {
        text-align: center;
      }
    }

    #resource-selector {
      margin: $window-padding / 2;
      text-align: center;

      .bp3-form-group,
      .bp3-form-content {
        display: flex;
        justify-content: center;
      }

      .bp3-label {
        text-align: center;
      }
    }

    .panel-header {
      background-color: $black;
    }
  }

  .panel-header {
    height: 50px;
    padding: 0 $window-padding;

    display: flex;
    flex-direction: row;
    align-items: center;
  }

  #exploration-panel {
    background-color: $light-gray5;
    color: $black;
    flex-basis: 75%;
    max-width: 75%;
    display: flex;
    flex-direction: column;
    overflow: scroll;

    .panel-header {
      background-color: $gray5;
    }
  }
}

#fhir-resource-tree {
  overflow-y: scroll;

  .bp3-tree {
    box-shadow: none;

    .bp3-icon.bp3-intent-success {
      color: $green5;
    }
  }

  .bp3-tree-node-content:hover {
    background-color: $dark-gray3;
  }

  .bp3-tree-node-selected .bp3-tree-node-content:hover {
    background-color: $blue4;
  }

  .bp3-tree-node-content {
    padding-top: 2px;
    padding-bottom: 2px;
    height: 34px;
  }

  .bp3-tree-node-label {
    .node-label {
      line-height: 1.1em;

      .node-type {
        color: $gray2;
        font-size: 0.8em;
      }
    }
  }

  .bp3-tree-node-selected .bp3-tree-node-label .node-type {
    color: $gray5;
  }
}

#input-groups:empty {
  display: none;
}
#input-groups {
  padding: $window-padding;
  min-height: 20%;
  overflow-x: scroll;

  & > *:not(:last-child) {
    margin-bottom: calc(#{$window-padding} / 2);
  }

  .delete-input-group {
    text-align: right;
    margin: 0%;
    padding: 0%;
  }

  .add-input-buttons {
    .bp3-button {
      margin-left: 10px;
    }
  }

  .divider-conditions {
    margin-top: 30px;
    display: flex;
    align-items: center;

    .divider-conditions-before {
      flex-grow: 1;
    }
    .divider-conditions-after {
      flex-grow: 10;
    }
  }

  .stacked-tags {
    display: flex;
    flex-direction: column;
    align-self: center;

    .bp3-tag {
      text-align: center;
    }
    .bp3-button {
      word-wrap: break-word;
    }
  }

  .attribute-inputs {
    display: flex;
  }

  #input-group-merging-script {
    padding: calc(#{$window-padding} / 2);
    margin-left: calc(#{$window-padding} / 2);

    .stacked-tags {
      width: fit-content;
    }
  }

  .input-cards {
    width: 100%;

    #input-column-rows {
      flex-grow: 1;
      margin-right: calc(#{$window-padding} / 2);
    }

    .input-static,
    .input-column,
    .input-condition {
      margin-top: #{$window-padding};
      margin-bottom: #{$window-padding};

      .input-card {
        display: flex;
        align-items: center;

        .bp3-card {
          width: 100%;
        }

        .static-input-form,
        .sql-input-form,
        .conditions-form {
          width: 100%;
          display: flex;
          justify-content: center;

          .column-select {
            display: flex;

            .column-select-input {
              align-self: center;
            }
            .column-select-joins {
              margin-left: 10px;
            }
          }

          .sql-input-form-script,
          .conditions-form-action,
          .conditions-form-column,
          .conditions-form-relation,
          .conditions-form-value,
          .conditions-form-condition-select {
            align-self: center;
            margin-left: 10px;
            margin-right: 10px;
          }
        }

        .input-column-info {
          width: 100%;
          padding: 10px $window-padding;
        }

        .input-column-info > * {
          width: 100%;

          display: flex;
          flex-direction: row;
          align-items: flex-start;

          .input-column-name {
            display: flex;
            flex-basis: 50%;
            flex-grow: 1;
            align-self: center;
          }

          .input-script {
            display: flex;
            flex-basis: 50%;
            flex-grow: 1;
            align-self: center;
          }

          .input-column-join {
            display: flex;
            flex-basis: 25%;
            flex-grow: 1;
            flex-direction: column;
            align-items: stretch;

            .join {
              display: flex;
              align-items: center;
            }
          }
        }
      }
    }
  }
}

.bp3-card {
  position: relative;

  .bp3-inline {
    display: flex;
    flex-direction: row;
    justify-content: center;
  }

  & > *:not(:last-child) {
    margin-bottom: 15px;
  }

  .card-flex {
    display: flex;
    flex-direction: row;
    font-size: 14px;

    .card-tag,
    .card-tag-dynamic,
    .card-tag-condition {
      background-color: $gray1;
      color: $light-gray5;
      padding: 2px 8px;
      border-radius: 3px;
    }
    .card-tag-dynamic {
      background-color: $blue1;
    }
    .card-tag-condition {
      background-color: $turquoise3;
    }

    .card-credentials-missing {
      background-color: $orange1;
      color: $light-gray5;
      margin-left: 1rem;
      padding: 2px 8px;
      border-radius: 3px;
    }
  }

  .card-absolute {
    position: absolute;
    top: -7px;
  }

  .custom-checkbox {
    margin: auto;
    margin-left: 8px;
  }

  .centered-question-mark {
    align-self: center;
    padding-left: 5px;
  }
}

.bp3-popover-content {
  .text {
    width: min-content;
    margin: 5px;
  }
}
