@mixin globalStyles() {
  .smart-attach-tree-global {
    .selection {
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 6px;
    }

    .open-more-button {
      --tui-padding: 0;
    }

    &.file-row {
      display: flex;
      flex-direction: column;

      &.preview-mode {
        flex-flow: row wrap;
        gap: 8px;
        padding: 4px 0;

        .file {
          flex-shrink: 0;
          width: var(--preview-card-width, 145px);
        }
      }
    }

    &.file.preview-file {
      position: relative;

      .selection {
        position: absolute;
        z-index: 1;
        top: 4px;
        right: 4px;

        margin: 0;
      }

      .header {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        white-space: normal;
      }

      .file-action-container {
        opacity: 1;
      }
    }

    &.cdk-drag-preview.file {
      opacity: 0.3;
    }

    &.file.hovered + .file.hovered {
      border-top-color: transparent;
    }

    &.file.hovered:has(+ .file.hovered) {
      border-bottom-color: transparent;
    }

    &.file-row:has(.file.hovered) + .smart-attach-tree-global.file-row .file.hovered {
      border-top-color: transparent;
    }

    &.file-row:has(.file.hovered):has(+ .smart-attach-tree-global.file-row .file.hovered) .file.hovered {
      border-bottom-color: transparent;
    }

    &.file {
      cursor: move;
      display: flex;
      align-items: center;
      border: 1px solid transparent;

      &.hovered {
        border: 1px dashed rgb(12 102 228 / 100%);
      }

      .header {
        display: flex;
        align-items: center;
        justify-content: space-between;

        width: 100%;

        white-space: nowrap;
      }

      .file-name {
        color: rgb(12 102 228 / 100%);
      }

      .file-action-container {
        width: 24px;
        min-width: 24px;
        opacity: 0;
      }

      &:hover,
      &:focus-within {
        .file-action-container {
          opacity: 1;
        }
      }

      .size-cell {
        width: 80px;
        padding: 0 5px;
      }
    }

    &.file-row:not(.preview-mode) .file {
      .file-name {
        width: 200px;
        min-width: var(--tui-padding-s);
      }
    }

    .expand-versions-cell {
      display: flex;
      margin-right: 6px;
    }

    .file-action-container-placeholder,
    .selection-placeholder,
    .chevron-btn--placeholder {
      pointer-events: none;
      visibility: hidden;
    }

    .chevron-btn--placeholder {
      margin-right: 6px ;
    }
  }
}
