.views-row {
    margin-bottom: (2*$grid-gutter);
}

.terms .views-row {
  margin-bottom: 0;
}

.view-header.h3,
h3.field__label {
  @extend %allcaps;
  font-size: $font-size-s;
  line-height: 1.866;
  font-family: var(--font-base);
  font-weight: bold;
}

.view-header {

  .button {
    margin-right: $grid-gutter;
    @include breakpoint(m) {
      margin-bottom: (2*$grid-gutter);
    }
  }

  p:last-child {
    margin-bottom: (0.5*$grid-gutter);
  }

}

.pager + .view-footer {
  text-align: center;
}


.view-filters {
  margin-bottom: (2*$grid-gutter);

  .form-actions {
    margin-bottom: 0;
  }

}

.view .infobox {
  display: inline-block;
  margin-bottom: (2*$grid-gutter);
  padding: .5rem 1rem;
  background: var(--color-bg-info);
  color: var(--color-info);
}



.view-header .result-counter {
  margin-bottom: $grid-gutter;
}

.field--type-viewfield {
  > .field__items > .field__item {
    border-top: 1px solid $color-divider-light;
    margin-top: $grid-gutter;
    margin-bottom: $grid-gutter;

    &:first-child {
      border-top: 0;
    }
  }
}

.views-table {
  tr {
    //border-color: transparent;
  }

  .flag {
    float: right;
    vertical-align: baseline;
  }

  @media screen and (max-width: 48rem) {
    tbody {
      display: block;
    }
    tr {
      display: flex;
      flex-direction: column;
      align-content: flex-start;
      justify-content: flex-start;
      margin-bottom: $grid-gutter;
    }
    tr:not(:last-child) {
      border:0;
    }
    thead tr {
      flex-flow: row wrap;
    }
    td {
      align-self: center;
      .view-my-content & {
        align-self: flex-start;
        padding: .25em 0;
      }
    }
    h3 {
      margin: 0;
    }
    .views-field-title {
      font-weight: bold;
    }
  }

  .taxonomy-term--tag {
    white-space: pre;
    margin-bottom: 0;
  }
}

/* Bookmarks view */
// @todo: move to appropriate file

.bookmarks .views-table tr {
  display: unset;
}

.bookmarks table {
  tr {
    border-bottom-width: 0;
  }
  td:first-child {
    width: 4rem;
    padding-right: 0;
  }
  td {
    vertical-align: top;
  }
  .flag-bookmark-node {
    margin-top: $grid-gutter;
  }
  .flag-bookmark-term {
    top: .25rem;
  }
}

.view-my-bookmarks td.views-field-link-flag {
  padding-top: .45rem;
}

.view-my-bookmarks-taxonomy table td {
  vertical-align: middle;
}

.bookmarks table .profile-teaser.view-mode-compact {
  flex-flow: row nowrap;
  align-items: flex-start;
  text-align: left;
}

// bookmarks collections side-by-side

.field--name-field-my-bookmarks-view-ref {
  @include breakpoint(m) {
    > .field__items {
      display: flex;
      flex-flow: row wrap;
      gap: 0 2.5rem;

      > .field__item {
        flex-basis: calc(50% - 1.25rem);
        border-width: 0;
      }
    }
  }
}


/* Maps */

.view .leaflet-container {
  margin-bottom: (2 * $grid-gutter);
}
