@import '~graphiql/graphiql.css';

.more-text{
  margin-top: 10px;
  a:not([href]):not([tabindex]).more-link{
    color: #007bff;
    cursor: pointer;
  }
}

.list-group{
  .list-group-item{
    background-color: transparent;
  }
}

.word-wrap{
  word-wrap: break-word;
}

.word-no-wrap{
  white-space: nowrap;
}

.widgets-blur{
    -webkit-filter: blur(5px);
    -moz-filter: blur(5px);
    -o-filter: blur(5px);
    -ms-filter: blur(5px);
    filter: blur(5px);
}

.widgets-loading{
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,.3);

  &.dark{
    background-color: rgba(0,0,0,.3);
  }

  &>div{
    width: 5rem;
    height: 5rem;
    margin-top: 5rem;
  }
}

.ellipsis {
  position: relative;

  &:before {
    content: '&nbsp;';
    visibility: hidden;
  }

  span {
    position: absolute;
    left: 0;
    right: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.widgets-table{
  &.dark{
    color: #fff;

    &.table-hover{
      tbody{
        tr:hover{
          color: #e5e5e5;
        }
      }
    }
  }
}

.widgets-modal-open{
  overflow: hidden;
}

.widgets-links{
  margin-top: 5px;
  float: right;

  a.badge{
    color: #fff;
    font-size: 60%;
    cursor: pointer;

    display: inline-block;
    padding: 0.25em 0.4em;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;

    &.badge-secondary {
      background-color: #6c757d;
    }

    &:hover{
      color: #fff;
    }
  }
}

.widgets-modal{
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 1050;
  background-color: rgba(0,0,0,0.2);

  &.dark{
    .widgets-modal-dialog{
      .widgets-modal-content{
        background-color: #343a40;

        .widgets-modal-header{
          button.widgets-modal-close{
            color: #fff;
            text-shadow: 0 1px 0 #000;
          }
        }
        .widgets-modal-body{
          color: #fff;
          textarea{
            background-color: #627079;
            color: #fff;
          }
        }
        .widgets-modal-footer{
          .btn.btn-default{
            background-color: #212529;
            color: #fff;
          }
        }
      }
    }
  }

  &.widgets-modal-show{
    display: block;
  }
  .widgets-modal-dialog{
    position: relative;
    margin: 30px auto;

    @media screen and (min-width: 992px){
      width: 80%;
    }

    @media screen and (min-width: 768px) and (max-width: 991px){
      width: 90%;
    }

    .widgets-modal-content{
      background-color: #fff;
      box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2), 0 40px 77px 0 rgba(0, 0, 0, 0.22);
      border-radius: 2px;
      border: none;

      .widgets-modal-header{
        border-bottom: none;
        padding-top: 24px;
        padding-right: 24px;
        padding-bottom: 10px;
        padding-left: 24px;

        .widgets-modal-title{
          margin: 0;
          line-height: 1.428571429;
        }

        button.widgets-modal-close{
          padding: 0;
          cursor: pointer;
          background: transparent;
          border: 0;
          margin-top: -2px;
          -webkit-appearance: none;
          float: right;
          font-size: 21px;
          font-weight: bold;
          line-height: 1;
          color: #000;
          text-shadow: 0 1px 0 #fff;
          opacity: 0.2;
        }
      }

      .widgets-modal-body{
        padding-top: 0px;
        padding-right: 24px;
        padding-bottom: 16px;
        padding-left: 24px;
        height: 600px;
      }

      .widgets-modal-url{
        padding-top: 0px;
        padding-right: 24px;
        padding-bottom: 16px;
        padding-left: 24px;

        input{
          width: 100%;
        }
      }

      .widgets-modal-footer{
        padding-top: 0px;
        padding-right: 24px;
        padding-bottom: 16px;
        padding-left: 24px;
      }
    }
  }
}

.graphiql-container{
  .doc-explorer-title, .history-title, .docExplorerHide{
    padding: 0 10px 0 0;
  }
}

.widgets-graph-window{
  display: flex;
  flex-direction: column;
  height: 700px;

  .widgets-graph-full{
    display: inline;
  }
  .widgets-graph-small{
    display: none;
  }

  &.widgets-graph-window-fullscreen{
    background-color: white;
    overflow-x: hidden;
    overflow-y: auto;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 1050;
    height: 100%;

    .widgets-graph-full{
      display: none;
    }
    .widgets-graph-small{
      display: inline;
    }
  }

  .widgets-graph-menu{
    height: 50px;

    .widgets-graph-selector{
      margin-bottom: 5px;
    }
  }

  #widgets-graph{
    width: 100%;
    background-color: white;
    flex-grow: 1;
  }

  #widgets-graph-status{
    height: 100px;
    margin-bottom: 5px;
  }
}

.widgets-errors{
  color: red;
}

.widgets-set-units{
  position: absolute;
  z-index: 1000;
  bottom: 15px;
  left: 0;
  width: 100%;
  text-align: center;

  span{
    text-decoration-line: underline;
    text-decoration-style: dashed;
    text-underline-position: under;
    cursor: pointer;
  }

  select{
    top: 0;
    bottom: 0;
    margin: auto;
    position: absolute;
    left: 0;
    right: 0;
    opacity: 0;
  }
}

.widgets-revert-zoom{
  position: absolute;
  z-index: 1000;
  bottom: 15px;
  right: 10px;
  border-radius: 0.25rem;
  padding: 0 5px;
  cursor: pointer;
}