/* Search Results page
================================== */
.archive-post-results-container > .e-con-inner {
  justify-content: flex-start !important;
}

/* Search results page - search button */
.search-results-search-element form.elementor-search-form button {
  width: 100%;
  max-width: 234px;
}

/* Hide icon by default for larger screens */
.search-results-search-element form.elementor-search-form button i {
  display: none;
}

/* "search results for:" widget on search results page 
  ================================== */
.search-results-container .search-results-info h2 {
  margin: 0px !important;
  padding: 0px !important;
  line-height: 24px;
}

#search-results-widget article.elementor-post {
  border: 1px solid #d9d9d9;
}

#search-results-widget div.elementor-posts-container {
  grid-row-gap: 20px;
}

#search-results-widget .custom-post-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

#search-results-widget .custom-post-layout .left-column {
  flex: 0 0 30%;
  max-width: 30%;
}

#search-results-widget .custom-post-layout .middle-column {
  flex: 1;
  padding: 20px 10px 20px 20px;
  align-self: flex-start;
}

#search-results-widget .custom-post-layout .right-column {
  /* flex: 0 0 100px; */
  text-align: center;
  padding: 20px 20px 20px 0px;
}

#search-results-widget .custom-post-layout .elementor-post__thumbnail__link {
  margin: auto !important;
}

#search-results-widget .custom-post-layout .left-column,
#search-results-widget .custom-post-layout .left-column > a,
#search-results-widget .custom-post-layout .left-column > a > .elementor-post__thumbnail {
  height: 100%;
}

#search-results-widget .custom-post-layout .elementor-post__title {
  margin-bottom: 10px;
}

#search-results-widget .custom-post-layout .elementor-post__excerpt {
  margin-bottom: 0;
}
#search-results-widget .custom-post-layout .elementor-post__excerpt p {
  font-size: 16px;
  font-weight: 400;
  color: #000;
  line-height: 18.74px;
}

#search-results-widget .custom-post-layout .elementor-post__read-more {
  display: inline-block;
  padding: 10px 20px;
  background-color: #fff;
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  border: 1px solid var(--secondary-color);
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 700;
}

#search-results-widget .custom-post-layout .elementor-post__read-more:hover {
  background-color: var(--secondary-color);
  color: #fff;
}

#search-results-widget .custom-post-layout .two-line-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

#search-results-widget .custom-post-layout h3.elementor-post__title a {
  font-weight: 700;
  font-size: 24px;
  line-height: 28.18px;
  color: #000;
}

/* Search results pagination
  ================================== */
#search-results-widget .custom-pagination,
.custom-events-shortcode .custom-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 40px;
  margin-bottom: 20px;
}

#search-results-widget .custom-pagination .page-numbers.next,
.custom-events-shortcode .custom-pagination .page-numbers.next {
  margin: 0 0 0 10px;
}
#search-results-widget .custom-pagination .page-numbers.prev,
.custom-events-shortcode .custom-pagination .page-numbers.prev {
  margin: 0 10px 0 0;
}

#search-results-widget .custom-pagination .custom-btn,
.custom-events-shortcode .custom-pagination .custom-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  border: 1px solid var(--secondary-color);
  font-size: 16px;
  font-weight: 700;
}

#search-results-widget .custom-pagination .page-info,
.custom-events-shortcode .custom-pagination .page-info {
  font-size: 16px;
  font-weight: 700;
  margin: 0 3px;
}

/* search results categories filter 
  ===================================*/
.category-filter {
  overflow-y: auto;
  padding: 20px 30px;
}

.category-filter h2 {
  margin-bottom: 20px !important;
  margin-top: 0px !important;
  line-height: 24px !important;
}
.category-section {
  margin-bottom: 20px;
}

.category-filter input[type="checkbox"] {
  position: absolute;
  left: 0;
  top: 2px;
}

.category-filter h4 {
  font-weight: 700;
  font-size: 16px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.category-filter label {
  display: block;
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
  line-height: 20px;
}

.category-filter label::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #fff;
  border: 2px solid #000;
  transition: all 0.1s ease;
}

.category-filter label.checked::before {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.category-filter label::after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.category-filter label.checked::after {
  display: block;
}

.category-filter label:hover::before {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* hide the actual checkbox */
.category-filter input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.category-section-wrapper {
  margin-bottom: 10px;
}

.category-section-title {
  cursor: pointer;
  padding: 0px 0px 5px 0px;
  border-bottom: 1px solid #0aaedf;
}

.category-section-title .toggle-icon {
  float: right;
}

.category-filter .mobile-submit-wrapper {
  /* display: none; */
  margin-top: 20px;
  text-align: center;
}

.category-filter .mobile-submit-button {
  padding: 10px 20px;
  background-color: var(--secondary-color);
  border: none;
  border-radius: 5px;
  font-size: 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

/* new search element */
form.searchandfilter {
  margin: 0;
  display: flex;
  width: 100%;
}
form.searchandfilter > div {
  display: flex;
  flex-grow: 1;
}
form.searchandfilter ul {
  display: flex !important;
  flex-grow: 1;
  justify-content: flex-start;
  padding: 0;
  margin: 0;
  flex-direction: row;
}

form.searchandfilter ul li {
  display: flex;
  margin: 0;
  padding: 0;
}

form.searchandfilter ul li:first-child {
  flex-grow: 1;
}

form.searchandfilter ul li:nth-child(2) {
  /* width: 200px; */
  flex: 0 0 fit-content;
}
form.searchandfilter ul li:last-child {
  width: 100%;
  max-width: 234px;
}

form.searchandfilter input[type="text"] {
  width: 100%;
  height: 50px;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 5px 0 0 5px;
  font-size: 16px;
  background-color: #f1f2f3;
}

form.searchandfilter select {
  width: 100%;
  height: 50px;
  padding: 10px 10px 10px 10px;
  border: 1px solid #ccc;
  border-radius: 0;
  font-size: 16px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #f1f2f3;
  color: #000;
  text-decoration: none;
}

form.searchandfilter input[type="submit"] {
  width: 100%;
  height: 50px;
  background-color: var(--secondary-color);
  color: #fff !important;
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  border-radius: 0px 5px 5px 0px;
  position: relative;
}

form.searchandfilter input[type="submit"]:hover {
  background-color: var(--secondary-color);
}

form.searchandfilter input[type="text"]:focus-visible,
form.searchandfilter select:focus-visible {
  outline: none;
}

form.searchandfilter .submit-button-wrapper {
  position: relative;
  width: 100%;
  max-width: 234px;
}

.mobile-filter-title {
  display: none;
}

.mobile-filter-content {
  max-height: none;
  overflow: visible;
}

@media (max-width: 767px) {
  .category-filter .mobile-submit-wrapper {
    display: block;
  }

  form.searchandfilter ul li:last-child {
    max-width: 50px;
  }

  form.searchandfilter .submit-button-wrapper::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: #ffffff;
    z-index: 10;
    pointer-events: none;
  }

  form.searchandfilter input[type="submit"] {
    font-size: 0;
  }

  /* wrapper for filter on mobile */
  .category-filter > h2 {
    display: none;
  }

  .elementor-shortcode .category-filter {
    padding: 0px;
  }

  .mobile-filter-title {
    padding: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 10px;
    padding-right: 10px;
  }

  .mobile-filter-wrapper.active .mobile-filter-content {
    max-height: 20000px;
    transition: max-height 0.5s ease-in;
  }

  .mobile-filter-wrapper .toggle-icon {
    transition: transform 0.3s ease;
  }
}
