/* Parent Component Scope - Overlay */
.FilterOffcanvas_overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1050;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  animation: filterOverlayFadeIn 0.25s ease-out;
}

/* Offcanvas Container with Min and Max Width */
.FilterOffcanvas_overlay .FilterOffcanvas_container {
  width: 100%;
  min-width: 320px;
  max-width: 580px;
  background: #ffffff;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 24px 20px 20px 20px;
  position: relative;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
  animation: filterSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 380px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

/* Floating Centered Close Button */
.FilterOffcanvas_overlay .FilterOffcanvas_close_btn {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  border-radius: 50%;
  background: #1e3a8a;
  color: #ffffff;
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 10;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.FilterOffcanvas_overlay .FilterOffcanvas_close_btn:hover {
  background: #0f172a;
  transform: translateX(-50%) scale(1.05);
}

/* Modal Title */
.FilterOffcanvas_overlay .FilterOffcanvas_title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 8px 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

/* Body Split Container */
.FilterOffcanvas_overlay .FilterOffcanvas_body {
  display: flex;
  gap: 16px;
  overflow-y: auto;
  padding-bottom: 8px;
}

/* Left Sidebar Tabs */
.FilterOffcanvas_overlay .FilterOffcanvas_sidebar {
    width: 90px;
    min-width: 80px;
    max-width: 100px;
    background-color: #f1f5f9;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    overflow-y: auto;
}

.FilterOffcanvas_overlay .FilterOffcanvas_sidebar .sidebar_tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    background: #e8f1f8;
    border: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.FilterOffcanvas_overlay .FilterOffcanvas_sidebar .sidebar_tab svg {
  font-size: 18px;
}

.FilterOffcanvas_overlay .FilterOffcanvas_sidebar .sidebar_tab.active {
  color: #1e3a8a;
  background-color: #ffffff;
  font-weight: 700;
}

.FilterOffcanvas_overlay .FilterOffcanvas_sidebar .sidebar_tab.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background-color: #1e3a8a;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* Right Filter Content Pane */
.FilterOffcanvas_overlay .FilterOffcanvas_content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-right: 4px;
}

/* Filter Groups */
.FilterOffcanvas_overlay .filter_group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Dropdown styling */
.FilterOffcanvas_overlay .sort_dropdown_group {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.FilterOffcanvas_overlay .sort_dropdown_group label {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.FilterOffcanvas_overlay .select_wrapper {
  position: relative;
  min-width: 140px;
  max-width: 200px;
}

.FilterOffcanvas_overlay .select_wrapper select {
  width: 100%;
  appearance: none;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 6px 32px 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  outline: none;
}

.FilterOffcanvas_overlay .select_wrapper .select_icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 12px;
  color: #475569;
}

/* Sliders */
.FilterOffcanvas_overlay .slider_header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.FilterOffcanvas_overlay .slider_val {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  min-width: 50px;
  max-width: 70px;
}

.FilterOffcanvas_overlay .filter_range_slider {
  flex: 1;
  accent-color: #1e3a8a;
  cursor: pointer;
  height: 4px;
}

/* Filter Option Chips */
.FilterOffcanvas_overlay .chip_options_grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.FilterOffcanvas_overlay .filter_chip {
  background: #ffffff;
  border: 1px solid #1e3a8a;
  border-radius: 8px;
  padding: 6px 12px;
  min-width: 60px;
  max-width: 140px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.FilterOffcanvas_overlay .filter_chip:hover {
  background: #eff6ff;
}

.FilterOffcanvas_overlay .filter_chip.active {
  background: #1e3a8a;
  color: #ffffff;
}

/* Rating Chips Row */
.FilterOffcanvas_overlay .rating_chips_row {
  display: flex;
  gap: 10px;
}

.FilterOffcanvas_overlay .rating_chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  min-width: 70px;
  max-width: 90px;
}

.FilterOffcanvas_overlay .rating_chip .star_icon {
  color: #f59e0b;
}

.FilterOffcanvas_overlay .view_all_services_wrap {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
}

.FilterOffcanvas_overlay .view_services_link {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Keyframe Animations */
@keyframes filterSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes filterOverlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =========================================
   Responsive Breakpoints with Range Media Queries
   ========================================= */

@media (min-width: 381px) and (max-width: 576px) {
  .FilterOffcanvas_overlay .FilterOffcanvas_container {
    padding: 20px 14px 16px 14px;
    min-width: 280px;
    max-width: 100vw;
    max-height: 90vh;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }

  .FilterOffcanvas_overlay .FilterOffcanvas_title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .FilterOffcanvas_overlay .FilterOffcanvas_sidebar {
    width: 75px;
    min-width: 65px;
    max-width: 75px;
  }

  .FilterOffcanvas_overlay .FilterOffcanvas_sidebar .sidebar_tab {
    padding: 12px 4px;
    font-size: 10px;
  }

  .FilterOffcanvas_overlay .FilterOffcanvas_sidebar .sidebar_tab svg {
    font-size: 16px;
  }

  .FilterOffcanvas_overlay .filter_chip {
    padding: 5px 10px;
    font-size: 11px;
    min-width: 50px;
  }
}

@media (min-width: 0px) and (max-width: 380px) {
  .FilterOffcanvas_overlay .FilterOffcanvas_container {
    padding: 18px 12px 14px 12px;
    min-width: 280px;
    max-width: 100vw;
    max-height: 92vh;
  }

  .FilterOffcanvas_overlay .FilterOffcanvas_body {
    gap: 10px;
  }

  .FilterOffcanvas_overlay .FilterOffcanvas_sidebar {
    width: 65px;
    min-width: 60px;
    max-width: 65px;
  }

  .FilterOffcanvas_overlay .FilterOffcanvas_sidebar .sidebar_tab {
    padding: 10px 2px;
    font-size: 9px;
  }

  .FilterOffcanvas_overlay .select_wrapper {
    min-width: 100%;
    max-width: 100%;
  }

  .FilterOffcanvas_overlay .sort_dropdown_group {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .FilterOffcanvas_overlay .filter_chip {
    padding: 4px 8px;
    font-size: 10px;
    min-width: 45px;
  }
}
/* Links rendered as buttons (Explore Experts / View all Services) */
.FilterOffcanvas_overlay button.view_services_link {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}
