
$igv-generic-dialog-container-border-radius: 4px;
$igv-button-border-radius: 2px;
$igv-button-height: 28px;
$igv-button-width: 75px;

@mixin generic-input {

  input {
    display: block;
    height: 100%;
    width: 100%;

    padding-left: 4px;

    font-family: $igv-default-font-face;
    font-weight: 400;
    color: $igv-dark-grey-color;
    text-align: left;

    outline: none;

    border-style: solid;
    border-width: thin;
    border-color: $igv-grey-color;

    background-color: white;
  }

}

// generic dialog
.igv-generic-dialog-container {

  position: absolute;
  top: 0;
  left:0;
  width:300px;
  height:200px;

  border-color: $igv-trackgear-grey-color;
  border-radius: $igv-generic-dialog-container-border-radius;
  border-style: solid;
  border-width: thin;

  font-family: $igv-default-font-face;
  font-size: medium;
  font-weight: 400;

  z-index: 2048;

  background-color: white;

  display: flex;
  flex-flow: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;

  // header
  .igv-generic-dialog-header {

    display: flex;
    flex-flow: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;

    width: 100%;
    height: 24px;
    cursor: move;

    border-top-left-radius: $igv-generic-dialog-container-border-radius;
    border-top-right-radius: $igv-generic-dialog-container-border-radius;
    border-bottom-color: $igv-trackgear-grey-color;
    border-bottom-style: solid;
    border-bottom-width: thin;

    background-color: #eee;

    div {
      margin-right: 4px;
      margin-bottom: 2px;
      height: 12px;
      width: 12px;
      color: $igv-trackgear-grey-color;
    }

    div:hover {
      cursor: pointer;
      color: #444;
    }

  }

  // one-liner
  .igv-generic-dialog-one-liner {

    color: $igv-dark-grey-color;

    width: 95%;
    height: 24px;
    line-height: 24px;

    text-align: left;
    margin-top: 8px;
    padding-left: 8px;

    overflow-wrap: break-word;

    background-color: white;
  }

  // labeled input
  .igv-generic-dialog-label-input {
    margin-top: 8px;

    width: 95%;
    height: 24px;

    color: $igv-dark-grey-color;

    line-height: 24px;
    padding-left: 8px;

    background-color: white;

    display: flex;
    flex-flow: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;

    div {
      width: 30%;
      height: 100%;

      font-size: 16px;
      text-align: right;
      padding-right: 8px;

      background-color: white;
    }

    @include generic-input;
    input {
      width: 50%;
      font-size: 16px;
    }

  }

  // input
  .igv-generic-dialog-input {
    margin-top: 8px;

    width: calc(100% - 16px);
    height: 24px;

    color: $igv-dark-grey-color;

    line-height: 24px;

    display: flex;
    flex-flow: row;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;

    @include generic-input;
    input {
      font-size: 16px;
    }

  }

  // ok | cancel - container
  .igv-generic-dialog-ok-cancel {

    width: 100%;
    height: $igv-button-height;

    display: flex;
    flex-flow: row;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;

    div {
      margin-top: 32px;

      color: white;
      font-family: $igv-default-font-face;
      font-size: 14px;
      font-weight: 400;

      width: $igv-button-width;
      height: $igv-button-height;

      line-height: $igv-button-height;
      text-align: center;

      border-color: transparent;
      border-style: solid;
      border-width: thin;
      border-radius: 2px;

    }

    div:first-child {
      margin-left: 32px;
      margin-right: 0;
      background-color: $igv-button-ok-color;
    }

    div:last-child {
      margin-left: 0;
      margin-right: 32px;
      background-color: $igv-button-cancel-color;
    }

    div:first-child:hover {
      cursor: pointer;
      background-color: $igv-button-ok-hover-color;
    }

    div:last-child:hover {
      cursor: pointer;
      background-color: $igv-button-cancel-hover-color;
    }

  }

  // ok - container
  .igv-generic-dialog-ok {

    width: 100%;
    height: 36px;

    margin-top: 32px;

    display: flex;
    flex-flow: row;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;

    div {
      width: 98px;
      height: 36px;

      line-height: 36px;
      text-align: center;
      color: white;
      font-family: $igv-default-font-face;
      font-size: medium;
      font-weight: 400;

      border-color: white;
      border-style: solid;
      border-width: thin;
      border-radius: $igv-generic-dialog-container-border-radius;
      background-color: #2B81AF;
    }

    div:hover {
      cursor: pointer;
      background-color: #25597f;
    }

  }

}
