/*
Theme Name: 	BuddyBoss Child
Theme URI: 		https://www.buddyboss.com/
Description: 	A child theme of BuddyBoss Theme. To ensure easy updates, make your own edits in this theme.
Author: 		BuddyBoss.com
Author URI: 	https://www.buddyboss.com/
License: 		GNU General Public License v3 or later
License URI: 	http://www.gnu.org/licenses/gpl-3.0.html
Template: 		buddyboss-theme
Version: 		1.0.1
*/

/*

-- Stylesheet locations --

Add your own customizations into /css/custom.css in this child theme.

Parent styles are called from /buddyboss-theme/inc/theme/functions.php in the 
parent theme and are located in /buddyboss-theme/assets/css/ in the parent theme.


--- If you are editing CSS via the WordPress admin, do the following ---

1. Install the plugin WP Editor: http://wordpress.org/plugins/wp-editor/
2. Navigate to Appearance > Theme Editor in the WordPress admin.
3. Navigate into the /css/ folder of your child theme to edit custom.css.

*/

/* Make the header row flex so title + tag sit side by side */
.suggestion-post-header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	column-gap: 0.5rem;
}

/* Make sure the title doesn't force a line break */
.suggestion-post-title {
	display: inline;
	font-weight: 600;
	margin: 0;
}

/* Pill-style tag right of title */
.suggestion-post-tag {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;      /* pill */
	font-size: 11px;
	line-height: 1.4;
	background-color: #0b3b3b; /* tweak to match brand */
	color: #fff;
	white-space: nowrap;
}

/* Keep content/excerpt below */
.suggestion-post-content {
	display: block;
	margin-top: 2px;
}

/* Increase overall font size in Algolia autocomplete dropdown by ~25% */
.algolia-autocomplete .aa-dropdown-menu {
	font-size: 1.25em;
}

/* Make sure titles scale nicely with the new base size */
.suggestion-post-title {
	font-size: 1.1em;
}

/* Keep the pill readable with the larger base */
.suggestion-post-tag {
	font-size: 0.85em;
}



/* ================================
   ALGOLIA INSTANTSEARCH – ELEMENTOR LAYOUT
   Everything scoped to #ais-wrapper
   ================================ */

#ais-wrapper {
  max-width: 1400px;
  margin: 0 auto 4rem;
  padding: 2.5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#ais-top-search {
  background: linear-gradient(135deg, #0b3d3b 0%, #0f4b3f 45%, #173f2b 100%);
  padding: 3.5rem 0 3.75rem;
  width: 100vw !important;
  max-width: 100vw !important;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  display: flex;
  align-items: center;
  min-height: 220px;
}

#ais-top-search .e-con-inner {
  background: transparent;
  border-radius: 0;
  padding: 0 2rem;
  box-shadow: none;
  max-width: 1400px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

#ais-wrapper > .e-con {
  width: 100%;
  display: block;
}

#ais-wrapper .e-con,
#ais-wrapper .e-con-inner {
  display: flex;
  width: 100%;
  box-sizing: border-box;
}

#ais-wrapper .e-con-inner {
  gap: 1rem;
  flex-direction: column;
}

/* ---------- Section A: search ---------- */

#ais-top-search .e-con-inner {
  align-items: center;
}

#ais-wrapper .ais-SearchBox-form {
  width: 100%;
  max-width: 66%;
  min-width: 560px;
  background: #ffffff;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  margin: 0 auto;
  margin-bottom: 0;
}

#ais-wrapper .ais-SearchBox-input {
  width: 100%;
  padding: 0.4rem 0.25rem;
  border: 0;
  border-radius: 0;
}

#ais-wrapper #algolia-stats,
#ais-wrapper #algolia-powered-by {
  font-size: 0.85rem;
}

#ais-wrapper #algolia-stats {
  order: 2;
  margin-top: 0.8rem;
  width: 100%;
  text-align: center;
  position: static !important;
  display: block;
  color: rgba(255, 255, 255, 0.85);
}

#ais-wrapper .ais-Stats {
  position: static !important;
  top: auto !important;
  font-size: 0.85rem;
}

#ais-wrapper #algolia-search-box {
  order: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

#ais-wrapper #algolia-powered-by {
  order: 3;
  width: 100%;
  text-align: center;
  position: static !important;
  display: block;
  color: rgba(255, 255, 255, 0.7);
}

#ais-wrapper #algolia-stats .ais-Stats-text {
  display: block;
  text-align: center;
}

@media (max-width: 768px) {
  #ais-top-search {
    background: transparent;
    padding: 2rem 0 2.5rem;
  }

  #ais-top-search .e-con-inner {
    padding: 0 1rem;
  }

  #ais-wrapper .ais-SearchBox-form {
    max-width: 100%;
    min-width: 0;
  }

  #ais-wrapper #algolia-stats,
  #ais-wrapper #algolia-powered-by {
    color: #0b3d3b;
  }
}

#ais-wrapper .ais-SearchBox-submit,
#ais-wrapper .ais-SearchBox-reset {
  display: none;
}

/* ---------- Section B: categories buttons ---------- */

#ais-top-categories .e-con-inner {
  align-items: center;
}

#ais-wrapper #facet-categories .ais-HierarchicalMenu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

#ais-wrapper #facet-categories .ais-HierarchicalMenu-item {
  margin: 0;
}

#ais-wrapper #facet-categories .ais-HierarchicalMenu-link {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.15rem;
  border: 1px solid #0b3d3b;
  border-radius: 0;
  text-decoration: none;
  background: #0b3d3b;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  font-weight: 600;
}

#ais-wrapper #facet-categories .ais-HierarchicalMenu-item--selected
  .ais-HierarchicalMenu-link {
  background: #ffffff;
  color: #0b3d3b;
  border-color: #0b3d3b;
}

#ais-wrapper #facet-categories .ais-HierarchicalMenu-count {
  display: none;
}

/* ---------- Section C: results ---------- */

#ais-results .e-con-inner {
  align-items: stretch;
  gap: 1.5rem;
}

/* ---------- Hits grid (3 columns) ---------- */

#ais-wrapper #algolia-hits .ais-Hits-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
}

#ais-wrapper #algolia-hits .ais-Hits-item {
  flex: 1 1 calc(33.333% - 2rem);
  max-width: calc(33.333% - 2rem);
}

@media (max-width: 1100px) {
  #ais-wrapper #algolia-hits .ais-Hits-item {
    flex-basis: calc(50% - 1.5rem);
    max-width: calc(50% - 1.5rem);
  }
}

@media (max-width: 700px) {
  #ais-wrapper #algolia-hits .ais-Hits-item {
    flex-basis: 100%;
    max-width: 100%;
  }
}

#ais-wrapper .elementor-post {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 0;
}

#ais-wrapper .elementor-post__thumbnail,
#ais-wrapper .elementor-post__thumbnail a {
  display: block;
  margin: 0;
  padding: 0;
}

#ais-wrapper .elementor-post__thumbnail img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

#ais-wrapper .elementor-post__text {
  padding: 0.9rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

#ais-wrapper .elementor-post__title {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.2;
  font-family: "Playfair Display", serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #0b3d3b;
}

#ais-wrapper .elementor-post__title-link {
  text-decoration: none;
  color: inherit;
}

#ais-wrapper .elementor-post__excerpt,
#ais-wrapper .elementor-post__excerpt p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #0b3d3b;
}

/* ---------- Pagination ---------- */

#ais-wrapper #algolia-pagination {
  margin-top: 2rem;
  text-align: center;
}

#ais-wrapper .ais-Pagination {
  display: inline-flex;
  gap: 0.25rem;
}

#ais-wrapper .ais-Pagination-item a {
  display: inline-block;
  min-width: 32px;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
}
