.jef {
  --jef-bg: #242424;
  --jef-border: rgba(255, 255, 255, 0.3);
  --jef-text: #dedede;
  --jef-muted: #9a9a9a;
  --jef-accent: #42c7b5;
  position: relative;
  width: 100%;
}

.jef-filters {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1.05fr;
  align-items: center;
  width: min(calc(100% - 32px), 1015px);
  min-height: 84px;
  margin: 0 auto 54px;
  padding: 14px 22px;
  color: var(--jef-text);
  background: linear-gradient(105deg, #303030 0%, #1f1f1f 100%);
  border-radius: 999px;
  box-shadow: none;
}

.jef-filter {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 54px;
  padding: 0 34px;
}

.jef-filter:first-child {
  padding-left: 22px;
}

.jef-filter + .jef-filter {
  border-left: 2px solid rgba(255, 255, 255, 0.35);
}

.jef-filter > svg {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-right: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jef-filter input,
.jef-filter select {
  min-width: 0;
  width: 100%;
  height: 44px;
  margin: 0 !important;
  padding: 0 28px 0 0 !important;
  color: var(--jef-text) !important;
  font: inherit;
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0;
}

.jef-filter input {
  padding-right: 0 !important;
}

.jef-filter input::placeholder {
  color: var(--jef-text);
  opacity: 1;
}

.jef-filter select {
  appearance: none;
  cursor: pointer;
}

.jef-filter select option {
  color: #111;
  background: #fff;
}

/* Select2-enhanced location and category controls */
.jef-filter > .select2-container {
  flex: 1 1 auto;
  min-width: 0;
  width: 100% !important;
  font: inherit;
}

.jef-filter > .select2-container .select2-selection--single {
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 28px 0 0;
  color: var(--jef-text);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline: 0;
}

.jef-filter > .select2-container .select2-selection__rendered {
  width: 100%;
  padding: 0;
  color: var(--jef-text);
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 44px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jef-filter > .select2-container .select2-selection__arrow {
  top: 50%;
  right: 2px;
  width: 14px;
  height: 14px;
  transform: translateY(-64%);
}

.jef-filter > .select2-container .select2-selection__arrow b {
  display: block;
  position: static;
  width: 10px;
  height: 10px;
  margin: 0;
  border: 0;
  border-right: 3px solid var(--jef-muted);
  border-bottom: 3px solid var(--jef-muted);
  transform: rotate(45deg);
}

.jef-filter > .select2-container--open .select2-selection__arrow b {
  margin-top: 6px;
  transform: rotate(225deg);
}

.jef-filter:has(> .select2-container) > .jef-chevron {
  display: none;
}

/* Dropdown is appended inside .jef by JavaScript, keeping these rules scoped. */
.jef > .select2-container {
  z-index: 9999;
}

.jef .select2-dropdown {
  min-width: 220px;
  overflow: hidden;
  padding: 8px;
  color: #aaa;
  background: #242424;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

.jef .select2-results {
  padding: 0;
}

.jef .select2-results__options {
  max-height: 286px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #676767 #242424;
}

.jef .select2-results__option {
  margin: 0;
  padding: 8px 10px;
  color: #a9a9a9;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}

.jef .select2-results__option--highlighted[aria-selected],
.jef .select2-results__option--highlighted[aria-selected="true"],
.jef .select2-results__option[aria-selected="true"] {
  color: #d6d6d6;
  background: #3f3f3f;
}

.jef .select2-results__option--selected {
  color: #d6d6d6;
  background: #3f3f3f;
}

.jef .select2-search--dropdown {
  display: none;
}

.jef-chevron {
  position: absolute;
  right: 34px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--jef-muted);
  border-bottom: 3px solid var(--jef-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.jef-filter--search {
  z-index: 20;
}

.jef-autocomplete {
  position: absolute;
  z-index: 100;
  top: calc(100% + 14px);
  left: 12px;
  width: calc(100% - 24px);
  overflow: hidden;
  padding: 8px;
  background: #282828;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
}

.jef-autocomplete[hidden] {
  display: none;
}

.jef-suggestion {
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 12px 14px !important;
  color: #e8e8e8 !important;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-transform: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  cursor: pointer;
}

.jef-suggestion:hover,
.jef-suggestion.is-active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.jef-status {
  min-height: 22px;
  margin-bottom: 16px;
  color: var(--jef-muted);
  font-size: 14px;
  text-align: center;
}

.jef-results {
  transition: opacity 0.2s ease;
}

.jef.is-loading .jef-results {
  opacity: 0.45;
  pointer-events: none;
}

.jef-results .post-item {
  padding-bottom: 30px;
}

.jef-results .box-blog-post {
  width: 100%;
}

.jef-results .jef-flatsome-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jef-empty {
  grid-column: 1 / -1;
  padding: 64px 20px;
  text-align: center;
}

.jef-load-more {
  display: block;
  min-width: 160px;
  margin: 40px auto 0;
  padding: 13px 24px;
  color: #111;
  font-weight: 700;
  background: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.jef-load-more[hidden] {
  display: none;
}

@media (max-width: 849px) {
  .jef-filters {
    grid-template-columns: 1fr;
    width: min(calc(100% - 24px), 620px);
    padding: 8px 20px;
    border-radius: 28px;
  }

  .jef-filter,
  .jef-filter:first-child {
    min-height: 58px;
    padding: 8px 12px;
  }

  .jef-filter + .jef-filter {
    border-top: 1px solid var(--jef-border);
    border-left: 0;
  }

  .jef-chevron {
    right: 16px;
  }

  .jef .select2-dropdown {
    min-width: 190px;
    max-width: calc(100vw - 32px);
  }

  .jef-autocomplete {
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
  }
}

@media (max-width: 549px) {
  .jef-filters {
    margin-bottom: 32px;
  }

  .jef-results .box-vertical {
    display: block;
  }

  .jef-results .box-vertical .box-image,
  .jef-results .box-vertical .box-text {
    width: 100% !important;
  }
}
