.elbf {
  --elbf-accent: #6c3df4;
  --elbf-accent-strong: #5425d8;
  --elbf-text: #20242c;
  --elbf-muted: #6b7280;
  --elbf-border: #e6e8ee;
  --elbf-surface: #fff;
  width: 100%;
  max-width: 100%;
  margin: 12px 0 28px;
  color: var(--elbf-text);
}

.elbf__form {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--elbf-border);
  border-radius: 16px;
  background: var(--elbf-surface);
  box-shadow: 0 10px 28px rgba(22, 28, 45, .07);
}

.elbf__controls {
  display: grid;
  gap: 12px;
  align-items: center;
}

.elbf--sidebar .elbf__controls {
  grid-template-columns: minmax(0, 1fr);
}

.elbf--horizontal .elbf__controls {
  grid-template-columns: minmax(240px, 1fr) minmax(190px, .55fr) auto;
}

.elbf__field {
  position: relative;
  display: block;
  min-width: 0;
  margin: 0;
}

.elbf__icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 16px;
  color: var(--elbf-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.elbf__search,
.elbf__select,
.elbf__clear {
  min-height: 50px;
  border-radius: 12px;
  font: inherit;
}

.elbf__search,
.elbf__select {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: 1px solid var(--elbf-border);
  outline: 0;
  background: #fafbfc;
  color: var(--elbf-text);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.elbf__search {
  padding: 0 14px 0 48px;
  appearance: none;
}

.elbf__search::-webkit-search-cancel-button {
  cursor: pointer;
}

.elbf__select {
  padding: 0 40px 0 14px;
  cursor: pointer;
}

.elbf__search:hover,
.elbf__select:hover {
  border-color: #cfd3dc;
  background: #fff;
}

.elbf__search:focus,
.elbf__select:focus {
  border-color: var(--elbf-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(108, 61, 244, .13);
}

.elbf__clear {
  padding: 0 17px;
  border: 1px solid transparent;
  background: var(--elbf-accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.elbf--sidebar .elbf__clear {
  width: 100%;
}

.elbf__clear:hover {
  background: var(--elbf-accent-strong);
  box-shadow: 0 8px 20px rgba(84, 37, 216, .22);
  transform: translateY(-1px);
}

.elbf__clear:focus-visible {
  outline: 3px solid rgba(108, 61, 244, .28);
  outline-offset: 2px;
}

.elbf__clear[hidden] {
  display: none !important;
}

.elbf__search:disabled,
.elbf__select:disabled,
.elbf__clear:disabled {
  cursor: wait;
  opacity: .72;
}

.elbf__status {
  min-height: 1.35em;
  margin: 9px 4px 0;
  color: var(--elbf-muted);
  font-size: 13px;
  line-height: 1.35;
}

.elbf-target-loading {
  position: relative;
  min-height: 140px;
  pointer-events: none;
}

.elbf-target-loading .elementor-posts-container {
  opacity: .38;
  transition: opacity .15s ease;
}

.elbf-target-loading::after {
  position: absolute;
  z-index: 3;
  top: 72px;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid rgba(108, 61, 244, .18);
  border-top-color: var(--elbf-accent, #6c3df4);
  border-radius: 50%;
  content: '';
  animation: elbf-spin .7s linear infinite;
}

.elbf-empty {
  grid-column: 1 / -1;
  padding: 42px 24px;
  border: 1px dashed #d7dae2;
  border-radius: 16px;
  background: #fafbfc;
  color: var(--elbf-muted, #6b7280);
  text-align: center;
}

.elbf-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 26px 0 8px;
}

.elbf-pagination[hidden] {
  display: none !important;
}

.elbf-pagination__button {
  display: inline-grid;
  min-width: 42px;
  min-height: 42px;
  padding: 6px 10px;
  place-items: center;
  border: 1px solid var(--elbf-border, #e6e8ee);
  border-radius: 11px;
  background: #fff;
  color: var(--elbf-text, #20242c);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background-color .18s ease, transform .18s ease;
}

.elbf-pagination__button:hover:not(:disabled),
.elbf-pagination__button.is-current {
  border-color: var(--elbf-accent, #6c3df4);
  background: var(--elbf-accent, #6c3df4);
  color: #fff;
  transform: translateY(-1px);
}

.elbf-pagination__button:focus-visible {
  outline: 3px solid rgba(108, 61, 244, .24);
  outline-offset: 2px;
}

.elbf-pagination__button:disabled {
  cursor: not-allowed;
  opacity: .4;
}

.elbf-pagination__ellipsis {
  min-width: 22px;
  color: var(--elbf-muted, #6b7280);
  text-align: center;
}

@keyframes elbf-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
  .elbf--horizontal .elbf__controls {
    grid-template-columns: 1fr;
  }

  .elbf--horizontal .elbf__clear {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .elbf *,
  .elbf-target-loading .elementor-posts-container,
  .elbf-pagination__button {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .elbf-target-loading::after {
    animation-duration: 1.4s;
  }
}
