.editor-loading.is-loading {
  height: 200px;
}

.edit.githook .codemirror-container {
  border: 1px solid var(--color-secondary);
}

#editor-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  #editor-bar {
    gap: var(--button-spacing);
    .switch {
      overflow-x: scroll;
    }
  }
}

.cm-panel.fj-search {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--color-body);
  box-shadow: 0 6px 18px var(--color-shadow);
  border-radius: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;

  .search-input-group {
    align-items: center;
    background: var(--color-input-background);
    border: 1px solid var(--color-input-border);
    border-radius: 0.3rem;
    display: inline-flex;
    width: 100%;

    &:focus-within {
      border-color: var(--color-primary);
    }

    input {
      background: none !important;
      box-shadow: none !important;
      border-color: transparent !important;
    }

    label {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background-color: var(--color-secondary-bg);
      border-radius: 50%;
      padding: 6px 12px;
      height: 2em;
      width: 2em;
      font-size: 80%;
      white-space: pre;
      user-select: none;

      &:hover {
        background-color: var(--color-label-hover-bg);
      }

      &.focused {
        box-shadow:
          inset 0 1px 1px rgb(0 0 0 / 8%),
          0 0 8px var(--color-accent);
      }

      &.active {
        background-color: var(--color-accent);
      }
    }
  }

  .search-hidden-inputs {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .search-section,
  .replace-section {
    display: flex;
    gap: var(--button-spacing);
  }
}

@media screen and (max-width: 786px) {
  .cm-panel.fj-search {
    position: sticky;
    box-shadow: none;
  }
}
