/*
    Theme Name: Histudy Child
    Theme URI: https://rainbowthemes.net/themes/histudy
    Template: histudy
    Description: Histudy child theme for Vita Formation customizations.
    Author: Rainbow-Themes
    Author URI: https://themeforest.net/user/rainbow-themes/portfolio
    Version: 1.1.3
    Text Domain: histudy-child
*/

/* =========================================================
   Mobile header: keep cart / account / hamburger on one row
   ========================================================= */

@media (max-width: 1199px) {
  .rbt-header .header-right,
  .rbt-header-wrapper .header-right,
  header.rbt-header .header-right {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    width: auto !important;
  }

  .rbt-header .header-right .quick-access {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 6px;
    list-style: none;
  }

  .rbt-header .header-right .quick-access > li {
    margin: 0 !important;
  }

  .rbt-header .header-right .mobile-menu-bar,
  .rbt-header .header-right .hamberger {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
  }

  .rbt-header .header-right .rbt-round-btn,
  .rbt-header .header-right .hamberger-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .rbt-header .header-left {
    min-width: 0;
    flex: 1 1 auto;
  }

  .rbt-header .header-left .logo img {
    max-height: 42px !important;
    width: auto !important;
    height: auto !important;
    max-width: 140px;
    object-fit: contain;
  }

  .rbt-header .mainbar-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px;
  }

  .rbt-header .rbt-btn-wrapper {
    display: none !important;
  }
}

/* =========================================================
   Off-canvas / popup mobile menu
   ========================================================= */

.popup-mobile-menu .inner-top .content {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.popup-mobile-menu .logo a,
.popup-mobile-menu .logo {
  display: inline-flex !important;
  align-items: center;
  max-width: calc(100% - 56px);
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 8px;
}

.popup-mobile-menu .rbt-btn-close {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}

.popup-mobile-menu .logo img,
.popup-mobile-menu .logo-light-mode,
.popup-mobile-menu .logo-dark-mode,
.popup-mobile-menu .logo-normal {
  width: auto !important;
  height: auto !important;
  max-height: 48px !important;
  max-width: 170px !important;
  object-fit: contain !important;
}

.popup-mobile-menu .rbt-information-list a {
  word-break: break-word;
  white-space: normal;
  line-height: 1.4;
}

/* =========================================================
   Hide leftover author / rating filters
   ========================================================= */

.filter-inner .filter-select-option:has([data-var="instructor"]),
.filter-inner .select-rating,
.rbt-widget-ratings,
.rbt-single-widget.rbt-widget-ratings {
  display: none !important;
}

/* =========================================================
   Cute vertical side filters (courses archive)
   ========================================================= */

.vita-side-filters,
.filter-inner.vita-side-filters,
.vita-course-filters.vita-side-filters {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 18px !important;
  grid-template-columns: none !important;
  background: #fffdf8 !important;
  border: 1px solid #f0e4cf !important;
  border-radius: 22px !important;
  padding: 18px 16px !important;
  box-shadow: 0 10px 28px rgba(40, 30, 10, 0.08) !important;
  position: relative !important;
  z-index: 5 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

.vita-filter-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 2px;
}

.vita-filter-title {
  font-size: 15px;
  font-weight: 800;
  color: #1f2933;
}

.vita-filter-subtitle {
  font-size: 12px;
  color: #8a939e;
}

.vita-filter-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 8px;
}

.vita-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vita-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
}

.vita-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vita-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #eadfce;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  transition: all .18s ease;
}

.vita-chip:hover span,
.vita-chip.is-active span,
.vita-chip:has(input:checked) span {
  background: #d9f26e;
  border-color: #c9e35a;
  color: #1f2a10;
  box-shadow: 0 4px 10px rgba(170, 200, 40, 0.25);
}

@media (min-width: 992px) {
  /* Banner stays under the course/filter section */
  body.post-type-archive-courses .rbt-page-banner-wrapper,
  body.tax-course-category .rbt-page-banner-wrapper {
    z-index: 1 !important;
  }

  body.post-type-archive-courses .rbt-page-banner-wrapper .rbt-banner-image,
  body.tax-course-category .rbt-page-banner-wrapper .rbt-banner-image {
    pointer-events: none !important;
    z-index: -1 !important;
  }

  /* Course block must stack above the banner gradient */
  body.post-type-archive-courses .rbt-section-overlayping-top,
  body.post-type-archive-courses .has-filter-layout,
  body.tax-course-category .rbt-section-overlayping-top,
  body.tax-course-category .has-filter-layout {
    position: relative !important;
    z-index: 20 !important;
  }

  body.post-type-archive-courses .vita-courses-layout,
  body.tax-course-category .vita-courses-layout {
    display: grid !important;
    grid-template-columns: 270px minmax(0, 1fr) !important;
    gap: 28px !important;
    align-items: start !important;
    width: 100% !important;
  }

  body.post-type-archive-courses .vita-courses-layout > .row,
  body.tax-course-category .vita-courses-layout > .row {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.post-type-archive-courses .vita-filter-rail,
  body.tax-course-category .vita-filter-rail {
    position: sticky !important;
    top: 110px !important;
    z-index: 25 !important;
    width: 270px !important;
    max-width: 270px !important;
  }

  .vita-filter-rail .default-exp-wrapper,
  .vita-filter-rail .histudy-filter-style-1,
  .vita-filter-rail .default-exp-expand {
    display: block !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
    z-index: auto !important;
    width: 100% !important;
    overflow: visible !important;
  }

  /* Sidebar always open — hide old Filter toggle */
  body.post-type-archive-courses .rbt-course-top-wrapper .rbt-short-item-filter,
  body.post-type-archive-courses .rbt-course-top-wrapper .filter-button,
  body.post-type-archive-courses .rbt-course-top-wrapper button.filter,
  body.post-type-archive-courses .filter-button,
  body.post-type-archive-courses button.rbt-filter-btn,
  body.tax-course-category .rbt-course-top-wrapper .rbt-short-item-filter,
  body.tax-course-category .filter-button {
    display: none !important;
  }
}

@media (max-width: 991px) {
  .vita-side-filters {
    margin-top: 12px;
  }
}

/* === Vita price range slider === */
.vita-price-slider {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 2px;
}
.vita-price-values {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}
.vita-price-values strong {
  color: #1f2933;
  font-weight: 800;
}
.vita-price-track-wrap {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
}
.vita-price-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  border-radius: 999px;
  background: #efe6d6;
  pointer-events: none;
}
.vita-price-range {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  right: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8f7a0 0%, #c9e35a 100%);
}
.vita-price-thumb {
  position: absolute;
  left: 0;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
  height: 28px;
  margin: 0;
  outline: none;
}
.vita-price-thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #b7d63f;
  box-shadow: 0 4px 10px rgba(80, 90, 20, 0.22);
  cursor: grab;
  position: relative;
  z-index: 3;
}
.vita-price-thumb::-moz-range-thumb {
  pointer-events: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #b7d63f;
  box-shadow: 0 4px 10px rgba(80, 90, 20, 0.22);
  cursor: grab;
}
.vita-price-thumb::-webkit-slider-runnable-track {
  background: transparent;
  height: 8px;
}
.vita-price-thumb::-moz-range-track {
  background: transparent;
  height: 8px;
  border: 0;
}
.vita-price-thumb-min { z-index: 2; }
.vita-price-thumb-max { z-index: 3; }
.vita-price-hints {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #9aa3ad;
}
.rbt-card.vita-price-hidden,
.tutor-course-card.vita-price-hidden {
  display: none !important;
}

