@import "src/style/modules";

.time-machine-queries {
  width: 100%;
  height: 100%;
  display: inline-flex;
  flex-direction: column;
}

.time-machine-queries--controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  background-color: $g0-obsidian;
  padding: $cf-marg-a;
  padding-bottom: 0;
  border-radius: $cf-radius + ($cf-border / 2);
}

.time-machine-queries--tabs {
  display: inline-flex;
  margin-right: $cf-marg-b;
  margin-bottom: $cf-marg-a;
  position: relative;
  flex: 1 1 auto;

  &::-webkit-scrollbar {
    height: 0;
    width: 0;
  }
}

.time-machine-queries--new {
  margin-left: $cf-border;
}

.time-machine-queries--buttons {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;

  > * {
    margin-bottom: $cf-marg-a;
  }
}

.time-machine-queries--body {
  flex-grow: 1;
  position: relative;
  height: 100%;
}

.time-machine-influxql-editor {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.time-machine--editor-title {
  user-select: none;
  font-weight: 500;
  padding-left: 6px;
  color: $g13-mist;
}

.view-raw-data-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-right: $cf-marg-b;

  .cf-slide-toggle {
    margin-left: $cf-marg-a;
  }
}

@media screen and (min-width: $cf-grid--breakpoint-sm) {
  .time-machine-queries--controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: $cf-marg-a;
  }
  .time-machine-queries--tabs {
    margin-bottom: 0;
  }
  .time-machine-queries--buttons > * {
    margin-bottom: 0;
  }
}
