// The code snippets in this file are derived from the Halcyon theme
//- https://github.com/dbarenholz/halcyon-obsidian?tab=readme-ov-file */

body {
  --prompt-border-color: var(--flexcyon-base-02-03-mix);
  --search-clear-button-color: var(--flexcyon-red-salmon);
  --search-icon-color: var(--flexcyon-accent);
  --flexcyon-suggestion-verti-padding: 8px;
  --flexcyon-suggestion-horiz-padding: 12px;

  .search-input-container > input {
    background-color: var(--background-primary);
  }

  .suggestion-title {
    padding: 2px 8px;
  }

  .prompt > .prompt-results > .suggestion-item .suggestion-highlight {
    color: var(--interactive-accent);
  }

  .prompt input.prompt-input {
    color: var(--interactive-accent);
    font-weight: bold;
  }

  .search-result:not(.is-collapsed) .search-result-file-title {
    color: var(--text-normal);
  }

  .search-result:not(.is-collapsed) .search-result-file-matched-text {
    color: var(--text-accent);
    font-weight: bold;
  }
}

body.flexcyon-prompt-align-bottom-left {
  .modal-container .prompt {
    top: 30vh;
    left: 0px;
  }
}

body.flexcyon-prompt-align-bottom-center {
  .modal-container .prompt {
    top: 30vh;
  }
}

body.flexcyon-prompt-align-center-left {
  .modal-container .prompt {
    left: 0px;
  }
}

body.flexcyon-prompt-align-top-left {
  .modal-container .prompt {
    left: 0px;
    top: 0px;
  }
}

body.flexcyon-prompt-align-top-center {
  .modal-container .prompt {
    top: 0px;
  }
}

body {
  .suggestion-item {
    padding: var(--flexcyon-suggestion-verti-padding)
      var(--flexcyon-suggestion-horiz-padding);
    opacity: var(--dimmed);
  }

  .suggestion-item.is-selected {
    opacity: 0.9;
  }
}

body.theme-dark .suggestion-item.mod-complex .suggestion-prefix {
  color: var(--color-blue);
}

body.theme-light .suggestion-item.mod-complex .suggestion-prefix {
  color: rgba(var(--color-orange-rgb), 0.85);
}

body .suggestion-item.mod-complex {
  font-size: calc(var(--font-ui-medium) - 0.5px);

  &.is-selected {
    font-size: var(--font-ui-medium);
  }

  .suggestion-prefix {
    background-color: transparent;
    margin-right: 16px;

    &::after {
      display: none;
    }
  }
  .suggestion-highlight {
    opacity: 1;
    font-weight: bold;
    font-size: calc(var(--font-ui-medium) + 0.5px);
  }

  &.is-selected .suggestion-hotkey {
    font-size: var(--font-ui-small);
    font-weight: bold;
    opacity: unset;
  }
  &.is-selected .suggestion-prefix {
    opacity: unset;
  }
}

.search-result-file-match {
  padding: 12px 12px;
  // box-shadow: none;
  border-bottom: 12px solid var(--color-base-05);
}

.search-results-children .tree-item.search-result {
  padding: 2px 4px;
}
