.SearchResult-dragContainer {
  left: 0;
  position: fixed;
  top: 0;
  z-index: var(--BoardContainer-zIndex, 10000);
}

.SearchResult-board {
  height: 100%;
  position: relative;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.SearchResult-board-column {
  --BoardColumn-minWidth: 276px;
  --BoardColumn-maxWidth: 400px;
  --BoardColumn-calcWidth: clamp(
    var(--BoardColumn-minWidth),
    calc(100% / var(--columnCount)),
    var(--BoardColumn-maxWidth)
  );

  border-right: 1px solid var(--color-gray3);
  display: flex;
  left: 0;
  min-height: 100%;
  position: absolute;
  top: 0;
  width: var(--BoardColumn-calcWidth);
  z-index: 1;

  &:nth-child(6n + 1) {
    background-color: var(--color-purple1);

    .BoardView-title {
      border-bottom: solid 2px var(--color-purple4);
    }
  }

  &:nth-child(6n + 2) {
    background-color: var(--color-blue1);

    .BoardView-title {
      border-bottom: solid 2px var(--color-blue4);
    }
  }

  &:nth-child(6n + 3) {
    background-color: var(--color-green1);

    .BoardView-title {
      border-bottom: solid 2px var(--color-green4);
    }
  }

  &:nth-child(6n + 4) {
    background-color: var(--color-yellow1);

    .BoardView-title {
      border-bottom: solid 2px var(--color-yellow4);
    }
  }

  &:nth-child(6n + 5) {
    background-color: var(--color-orange1);

    .BoardView-title {
      border-bottom: solid 2px var(--color-orange4);
    }
  }

  &:nth-child(6n + 6) {
    background-color: var(--color-red1);

    .BoardView-title {
      border-bottom: solid 2px var(--color-red4);
    }
  }
}

.SearchResult-board-columnContent {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.BoardView-title {
  align-items: center;
  background-color: var(--color-white);
  color: var(--color-black);
  display: flex;
  margin: 0;
  min-height: var(--gap-xl);
  overflow: hidden;
  padding: 0 var(--gap-s);
  position: relative;
  text-indent: var(--gap-s);
  text-transform: capitalize;

  &::after {
    content: '(' attr(data-count) ')';
    font-weight: normal;
  }
}

.BoardView-listContainer {
  flex-grow: 1;
  overflow-y: auto;
  position: relative;
}

.BoardView-list {
  border-bottom: var(--gap-s) solid transparent;
  list-style-type: none;
  margin: 0;
  min-height: 100%;
  position: absolute;
  width: 100%;
}

.BoardView-card {
  background: var(--color-white);
  box-shadow: var(--shadow-1);
  list-style-type: none;
  margin: 0 var(--gap-s) var(--gap-s) var(--gap-s);
  min-width: calc(100% - var(--gap-s) * 2);
  position: absolute;
  z-index: 10;

  .ContentSummary-content {
    .ContentSummary-row {
      display: flex;
      flex-wrap: wrap;
      margin-bottom: unset;

      .ContentSummary-subtitle {
        margin-bottom: unset;
        margin-right: var(--gap-xs);
      }

      .ContentSummary-link {
        flex: 1;
      }

      .ContentSummary-subtitle {
        flex-basis: 100%;
      }
    }

    .SearchResult-summary {
      margin-bottom: var(--gap-l);
    }

    .Viewers {
      float: right;
    }
  }
}

.BoardView-card.is-saving {
  pointer-events: none;

  .ContentSummary-content {
    opacity: 0.4 !important;
  }

  &::after {
    &:extend(.Icon);

    animation: spin var(--time-xl) infinite ease-in-out;
    content: 'sync';
    left: calc(50% - var(--Icon-size) / 2);
    position: absolute;
    top: calc(50% - var(--Icon-size) / 2);
  }
}

.BoardView-card .ContentSummary-content {
  padding: var(--gap-m) var(--gap-m) var(--gap-l);
}

.BoardView-card.muuri-item-dragging .ContentSummary-content {
  transform: rotateZ(0.5deg);
  transition: transform 0.12s ease;
}

.BoardView-card.muuri-item-releasing {
  z-index: 11;
}

.BoardView-card.muuri-item-dragging {
  box-shadow: var(--shadow-2);
  cursor: move;
  z-index: 12;
}

.BoardView-card.muuri-item-hidden {
  z-index: 8;
}

.BoardView-card.muuri-item-placeholder {
  filter: blur(1px);
  margin: 0;
  opacity: 0.6;
  z-index: 9;
}

// Overrides standard search styles, establishes grid layout
.SearchResult-items.is-muuri {
  display: grid;
  grid-auto-rows: auto 1fr;
  margin-top: unset;
  padding: unset;

  .SearchResult-views {
    position: unset;
  }

  .SearchResult-view {
    display: grid;
    grid-template: 'fields fields fields' auto 'sorts sorts actions' auto 'board board board' 1fr ~'/' auto auto 1fr;
  }

  .SearchResult-actions-wrapper {
    grid-area: actions;
    justify-self: end;
    padding: var(--gap-xs) var(--gap-l) var(--gap-xs) 0;
  }

  .SearchResult-sorts {
    align-self: center;
    grid-area: sorts;
    padding-left: var(--gap-l);
  }

  .SearchResult-boardContainer {
    background-color: var(--color-gray1);
    border-top: 1px solid var(--color-gray3);
    grid-area: board;
    overflow-x: scroll;

    .moreCards-button,
    .moreColumns-button {
      display: none;
    }
  }
}

.SearchResult-board-fields {
  align-self: center;
  display: flex;
  grid-area: fields;
  justify-self: start;
  margin-right: var(--gap-l);
  padding-left: var(--gap-l);
  padding-top: var(--gap-s);

  .ComboInput::before {
    border-bottom-width: 0;
  }

  .SearchResult-fields {
    padding-top: var(--gap-s);
    white-space: nowrap;
  }
}

@media (@mq-m) {
  .SearchResult-items.is-muuri .SearchResult-view {
    grid-template: 'fields sorts actions' auto 'board board board' 1fr ~'/' auto auto 1fr;

    .SearchResult-board-fields {
      padding-top: unset;
    }

    .SearchResult-sorts {
      padding-left: unset;
    }
  }
}

.SearchResult-board-errors {
  bottom: 0;
  max-height: 50%;
  max-width: 350px;
  overflow: auto;
  position: fixed;
  right: 0;
  z-index: 100;

  li {
    margin-bottom: var(--gap-m);
  }
}

.SearchResult-board-errors-close {
  .Text.is-l;

  color: var(--color-white);
  cursor: pointer;
  height: var(--gap-l);
  position: absolute;
  right: var(--gap-s);
  text-align: center;
  top: var(--gap-s);
  width: var(--gap-l);
  z-index: 100;
}
