.mermaid {
  background-color: white;
}
.explainExpandedContainer {
  position: absolute;
  top: 1rem;
  left: 1rem;
  bottom: 1rem;
  right: 1rem;
  border-radius: 1rem;
  background-color: white;
  border: 1px solid black;
  box-shadow: rgba(0, 0, 0, 0.8) 3px 3px 15px;
  overflow: hidden;
  padding: 1rem;
  z-index: 1000;
  font-family: "Roboto", sans-serif;
}
.explainExpandedTitle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2rem;
  text-align: center;
  font-size: 1.5rem;
}
.explainExpandedCloseContainer {
  position: absolute;
  top: 0;
  right: 0;
}
.explainExpandedCloseButton {
  font-size: 2rem;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  outline: none;
  width: 2rem;
  height: 2rem;
}
.explainExpandedMain {
  overflow: auto;
  position: absolute;
  top: 2rem;
  bottom: 0;
  left: 0;
  right: 0;
}

.errorPopup {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ff9999;
  color: black;
  border: 1px solid black;
  border-radius: 7;
  width: 20rem;
  max-width: 90vw;
}
.errorPopupClose {
  float: right;
  background: transparent;
  border: none;
  margin-left: 10px;
  margin-bottom: 10px;
}
.errorPopupError {
  padding: 10px;
}

.explain-plan,
.explain-sql {
  font-size: 0.75rem;
  white-space: pre-wrap;
}

.ruru-footer {
  padding: var(--px-16) var(--px-8);
}

/* Ruru overrides for GraphiQL styles */

.graphiql-explorer-root input {
  /* Fixes 'ch' unit inputs so text isn't truncated */
  font-family: var(--font-family-mono);
  padding: 0;
}

.graphiql-container {
  button,
  button:focus {
    outline: 0;
  }
}

/* condensed layout */
.graphiql-container.condensed {
  --sidebar-width: 40px;
  --line-height: 1.25;
  --session-header-height: 34.5px;
  --font-size-caption: 1rem;
  --toolbar-width: 30px;

  button.graphiql-execute-button > svg {
    width: 12px;
    height: 12px;
  }
  .graphiql-toolbar-icon {
    width: calc(var(--toolbar-width) - 10px);
    height: calc(var(--toolbar-width) - 10px);
  }

  .graphiql-sessions {
    border-radius: 0;
    margin: 0;
  }

  .graphiql-plugin {
    padding: var(--px-8) var(--px-12);
    border-left: none;
  }
  .graphiql-sidebar {
    border-right: 1px solid
      hsla(var(--color-neutral), var(--alpha-background-heavy));
  }

  .graphiql-explorer-graphql-arguments > div > span > svg {
    margin-top: 3px;
    margin-bottom: -3px;
  }

  .graphiql-editor-tools {
    padding: 0;
  }
  .graphiql-tabs {
    border-radius: 0;
    padding: 0;
  }
  .graphiql-editor-tools > button:not(.graphiql-toggle-editor-tools) {
    padding: var(--px-4) var(--px-8);
  }
  .graphiql-editor-tools > button,
  .graphiql-tab {
    outline: 0;
    border-bottom: 3px solid transparent;
    border-top: 3px solid transparent;
    border-radius: 0;
  }
  .graphiql-editor-tools > button.active,
  .graphiql-tab.graphiql-tab-active {
    border-bottom-color: hsl(var(--color-primary));
  }
  .graphiql-tab {
    background: none;
    &:hover {
      background-color: hsla(
        var(--color-neutral),
        var(--alpha-background-light)
      );
    }
    &.graphiql-tab-active {
      background-color: var(--bg);
    }
  }
  .graphiql-query-editor,
  .graphiql-editor-tool {
    padding: var(--px-8);
  }
  .graphiql-query-editor {
    column-gap: var(--px-8);
  }

  .graphiql-session-header,
  #graphiql-session {
    padding: 0;
    padding-right: var(--px-8);
    height: initial;
  }
  .graphiql-horizontal-drag-bar {
    background-color: hsla(var(--color-neutral), var(--alpha-background-light));
    width: var(--px-8);
  }
  #graphiql-session .graphiql-horizontal-drag-bar {
    background-color: transparent;
  }
  .graphiql-editors {
    box-shadow: none;
    border-radius: 0;
    border-top-right-radius: 13px;
  }
  .graphiql-tab-button {
    border-radius: 0;
  }
  .graphiql-logo {
    padding-right: var(--px-4);
  }
  .graphiql-doc-explorer-content > * {
    margin-top: var(--px-16);
  }
  .graphiql-doc-explorer-section-content > * + *,
  .graphiql-markdown-description {
    margin-top: var(--px-8);
  }
  .graphiql-doc-explorer-title,
  .graphiql-history-header,
  .doc-explorer-title {
    font-size: var(--font-size-h3);
  }
  .graphiql-history-header {
    align-items: flex-start;
  }
  .graphiql-doc-explorer-search-input {
    padding: var(--px-4) var(--px-8);
  }
  .graphiql-doc-explorer-search:not(:focus-within) [role="combobox"] {
    font-size: 1rem;
    width: 5em;
  }
  .graphiql-chevron-icon {
    height: var(--px-12);
    width: var(--px-12);
    margin: var(--px-8);
  }
  .ruru-footer {
    padding: var(--px-8) var(--px-4);
  }
}

.graphiql-dropdown-content {
  padding: 0;
}
.graphiql-dropdown-item {
  margin: 0;
}
.graphiql-dialog {
  .graphiql-dialog-header,
  .graphiql-dialog-section {
    padding: var(--px-12);
  }
}
