/* ==================================================
   DentCast Global Search — CSS (Scoped)
================================================== */

/* کانتینر اصلی سرچ (Bottom Sheet) */
/* کانتینر اصلی سرچ (Bottom Sheet) */
#dcGlobalBox.dc-global-filter-box {
  background: #ffffff;
  border-radius: 22px 22px 0 0; /* گوشه‌های پایین را صاف می‌کنیم */
  padding: 22px 22px 75px 22px ;
  border: 1px solid #e2e6f3;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
  
  /* --- موقعیت دهی Fixed و حالت بسته --- */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999; 

  max-height: 50vh;
   max-height: 50dvh;
  overflow-y: auto;
  
  /* حالت بسته: از دید خارج می‌شود */
  visibility: hidden;
  opacity: 0;
  transform: translateY(100%); /* باکس را کاملاً به پایین می‌فرستد */
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* حالت باز */
#dcGlobalBox.dc-global-filter-box.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0); /* باکس را به بالا می‌آورد */
}


/* عنوان سرچ */
#dcGlobalBox .dc-global-filter-title {
  font-weight: 700;
  font-size: 20px;
  color: #0b5fff;
  text-align: center;
  margin-bottom: 14px;
}

/* اینپوت سرچ */
#dcGlobalBox .dc-search-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid #d5d9ea;
  background: #f7f8fc;
  font-size: 14px;
  outline: none;
  margin-bottom: 16px;
}

#dcGlobalBox .dc-search-input::placeholder {
  color: #9aa1b3;
  font-size: 13px;
}

/* فیلترها */
#dcGlobalBox .dc-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

#dcGlobalBox .dc-filter-btn {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid #d3daf1;
  background: #eef3ff;
  color: #0b1d40;
  font-size: 13px;
  cursor: pointer;
}

#dcGlobalBox .dc-filter-btn.active {
  background: #0b5fff;
  color: #ffffff;
  border-color: #0b5fff;
  box-shadow: 0 4px 14px rgba(11, 95, 255, 0.3);
}

/* نتایج */
#dcResults.dc-results-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f9ff;
  border: 1px solid #e2e6f3;
  display: none;
  max-height: 25vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#dcResults .dc-result-item {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid #e3e6f2;
  font-size: 14px;
  color: #0b1d40;
  text-decoration: none;
}

#dcResults .dc-result-item:last-child {
  border-bottom: none;
}

#dcResults .dc-result-item:hover {
  background: #eef3ff;
}

/* دکمه بستن */
/* دکمه بستن (موقعیت دهی برای Fixed Box) */
#dcGlobalBox .dc-close-results {
  position: absolute; 
  top: 15px; /* فاصله از بالا */
  right: 15px; /* فاصله از راست */
  z-index: 10000;
  /* ... بقیه استایل‌های این کلاس را دست نزنید ... */
}


/* دکمه More */
#dcGlobalBox .dc-more-btn {
  background: #e0f2fe;
  padding: 10px 15px;
  margin-top: 8px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  color: #075985;
  font-weight: 600;
}
/* ====== Blur پس‌زمینه بدون دستکاری HTML ====== */
body.search-open > *:not(#dcGlobalBox) {
  filter: blur(10px);
  transition: filter 0.2s ease;
}

/* جلوگیری از blur روی خود سرچ */
#dcGlobalBox {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

/* قفل اسکرول وقتی سرچ بازه */
body.search-open {
  overflow: hidden;
  height: 100vh;
}
