/* Grid Layout */
.bde-loop {
  --bde-posts-per-row: 1;
  --bde-posts-gap: 20px;
  display: grid;
  grid-template-columns: repeat(var(--bde-posts-per-row), minmax(0, 1fr));
  gap: var(--bde-posts-gap);
  grid-auto-rows: auto;
}

.bde-loop-item {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}

/* List Layout */
.bde-loop-list {
  --bde-posts-per-row: 1;
}

/* Slider Layout */
.bde-loop-slider {
  --bde-posts-gap: 0px;
  display: flex;
  flex-wrap: nowrap !important;
}

/* Accordion Layout */
.bde-loop-accordion .bde-loop-item {
  width: 100%;
}

.bde-loop-accordion .bde-accordion__panel-content {
  padding: 0;
}

/* Isotope Layout */
.bde-loop-isotope {
  --bde-posts-isotope-width: calc(100% / var(--bde-posts-per-row));
  --bde-posts-isotope-width-diff: calc(
          var(--bde-posts-gap) - (var(--bde-posts-gap) / var(--bde-posts-per-row))
  );
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.bde-loop-isotope > .bde-loop-item,
.bde-loop-isotope .bde-loop-item-sizer {
  width: calc(var(--bde-posts-isotope-width) - var(--bde-posts-isotope-width-diff));
  margin-bottom: var(--bde-posts-gap);
}

.bde-loop-isotope .bde-loop-item-gutter {
  width: var(--bde-posts-gap);
}

/* Pass through html elements from global block */
.bde-loop-item .breakdance {
  display: contents;
}

/* Force cell to be full-width */
.bde-loop-list .bde-loop-item-sizer {
  width: 100%;
}

.breakdance .bde-post-list .bde-loop-list .bde-loop-item-sizer,
.breakdance .bde-post-list .bde-loop-isotope .bde-loop-item-gutter {
  pointer-events: none;
}

/*
 * Pagination
 */

.bde-posts-pagination-infinite-loader-wrapper {
  text-align: center;
}

.bde-posts-pagination-infinite-loader-wrapper {
  margin-top: 32px;
  font-size: 32px;
}

.bde-posts-pagination {
  font-size: 16px;
  gap: 20px;
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bde-posts-pagination ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
  justify-content: inherit;
}

.bde-posts-pagination a,
.bde-posts-pagination a:hover {
  color: inherit;
  text-decoration: none;
}

.bde-posts-pagination ul li a.is-active {
  color: var(--bde-brand-primary-color);
}

.bde-posts-navigation-numbers-prev-next {
  flex-direction: column;
}

.bde-posts-pagination .breakdance-form-loader {
  animation: posts-list-loading-spinner 1.5s linear infinite;
}

@keyframes posts-list-loading-spinner {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
