/*
 * Vazir Bricks Extras — Search Box Element
 *
 * Architecture:
 *   .vbe-search-box                  → inner visual root (CSS target for all controls)
 *   .vbe-search-box__trigger         → standalone icon button (icon-only / icon-overlay)
 *   .vbe-search-box__inline          → wrapper for icon-field / field-only modes
 *   .vbe-search-box__bar             → unified search bar container (border + bg)
 *   .vbe-search-box__bar-icon        → decorative icon span inside bar (icon-field)
 *   .vbe-search-box__form            → <form> element
 *   .vbe-search-box__input           → <input type="search">
 *   .vbe-search-box__submit          → submit button
 *   .vbe-search-box__panel           → AJAX results dropdown
 *   .vbe-search-box__dropdown        → wrapper for icon-only dropdown
 *   .vbe-search-box__overlay         → full-screen overlay (icon-overlay)
 *
 * ZERO-FOUC mode switching:
 *   PHP adds four CSS classes to the root: vbe-search-box--d-{mode},
 *   vbe-search-box--t-{mode}, vbe-search-box--ml-{mode}, vbe-search-box--mp-{mode}.
 *   CSS media queries match Bricks' default breakpoints and show/hide containers
 *   without any JavaScript, eliminating flash of wrong content on page load.
 *   The --vbe-sb-mode custom property is set by each mode class so JS can read
 *   the current active mode via getComputedStyle().getPropertyValue('--vbe-sb-mode').
 *
 * RTL-first: direction:rtl on root; logical CSS props where possible.
 */

/* ==========================================================================
   0. Reset & box-sizing
   ========================================================================== */

.vbe-search-box,
.vbe-search-box *,
.vbe-search-box *::before,
.vbe-search-box *::after {
  box-sizing: border-box;
}

/* Screenreader-only utility */
.vbe-screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================================================
   1. Inner visual root
   ========================================================================== */

.vbe-search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  direction: rtl;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  /* Width/MaxWidth controlled by barWidth/barMaxWidth controls */
}

/* ==========================================================================
   2. Zero-FOUC visibility — CSS classes set by PHP per Bricks breakpoint
   
   Breakpoint classes set on root:
     vbe-search-box--d-{mode}   → Desktop    (no media query)
     vbe-search-box--t-{mode}   → Tablet portrait   (max-width: 991px)
     vbe-search-box--ml-{mode}  → Mobile landscape  (max-width: 767px)
     vbe-search-box--mp-{mode}  → Mobile portrait   (max-width: 478px)
   
   Media query widths match Bricks' default breakpoints exactly.
   Same specificity (one class), later rules in the file cascade-win on smaller
   screens. JS reads --vbe-sb-mode to know the active mode without needing to
   hard-code viewport widths in JS logic.
   ========================================================================== */

/* ---- Base defaults: all mode-controlled containers hidden ---- */
.vbe-search-box__trigger { display: none; }
.vbe-search-box__inline  { display: none; }

/* ============================================================
   Desktop — no media query
   ============================================================ */

/* Custom property for JS mode detection */
.vbe-search-box--d-field-only   { --vbe-sb-mode: field-only; }
.vbe-search-box--d-icon-only    { --vbe-sb-mode: icon-only; }
.vbe-search-box--d-icon-field   { --vbe-sb-mode: icon-field; }
.vbe-search-box--d-icon-overlay { --vbe-sb-mode: icon-overlay; }

/* Trigger: visible for icon-only and icon-overlay */
.vbe-search-box--d-icon-only .vbe-search-box__trigger,
.vbe-search-box--d-icon-overlay .vbe-search-box__trigger    { display: inline-flex; }
.vbe-search-box--d-field-only .vbe-search-box__trigger,
.vbe-search-box--d-icon-field .vbe-search-box__trigger      { display: none; }

/* Inline: visible for icon-field and field-only */
.vbe-search-box--d-icon-field .vbe-search-box__inline,
.vbe-search-box--d-field-only .vbe-search-box__inline       { display: block; flex: 1; min-width: 0; position: relative; }
.vbe-search-box--d-icon-only .vbe-search-box__inline,
.vbe-search-box--d-icon-overlay .vbe-search-box__inline     { display: none; }

/* Bar icon: visible only for icon-field */
.vbe-search-box--d-icon-field .vbe-search-box__bar-icon     { display: inline-flex; }
.vbe-search-box--d-field-only .vbe-search-box__bar-icon,
.vbe-search-box--d-icon-only .vbe-search-box__bar-icon,
.vbe-search-box--d-icon-overlay .vbe-search-box__bar-icon   { display: none; }

/* Root width: full for inline modes, auto for icon-only / icon-overlay */
.vbe-search-box--d-icon-field,
.vbe-search-box--d-field-only  { width: 100%; }
.vbe-search-box--d-icon-only,
.vbe-search-box--d-icon-overlay { width: auto; }

/* ============================================================
   Tablet portrait — max-width: 991px  (< 992px in Bricks)
   ============================================================ */

@media (max-width: 991px) {
  .vbe-search-box--t-field-only   { --vbe-sb-mode: field-only; }
  .vbe-search-box--t-icon-only    { --vbe-sb-mode: icon-only; }
  .vbe-search-box--t-icon-field   { --vbe-sb-mode: icon-field; }
  .vbe-search-box--t-icon-overlay { --vbe-sb-mode: icon-overlay; }

  .vbe-search-box--t-icon-only .vbe-search-box__trigger,
  .vbe-search-box--t-icon-overlay .vbe-search-box__trigger   { display: inline-flex; }
  .vbe-search-box--t-field-only .vbe-search-box__trigger,
  .vbe-search-box--t-icon-field .vbe-search-box__trigger     { display: none; }

  .vbe-search-box--t-icon-field .vbe-search-box__inline,
  .vbe-search-box--t-field-only .vbe-search-box__inline      { display: block; flex: 1; min-width: 0; position: relative; }
  .vbe-search-box--t-icon-only .vbe-search-box__inline,
  .vbe-search-box--t-icon-overlay .vbe-search-box__inline    { display: none; }

  .vbe-search-box--t-icon-field .vbe-search-box__bar-icon    { display: inline-flex; }
  .vbe-search-box--t-field-only .vbe-search-box__bar-icon,
  .vbe-search-box--t-icon-only .vbe-search-box__bar-icon,
  .vbe-search-box--t-icon-overlay .vbe-search-box__bar-icon  { display: none; }

  .vbe-search-box--t-icon-field,
  .vbe-search-box--t-field-only  { width: 100%; }
  .vbe-search-box--t-icon-only,
  .vbe-search-box--t-icon-overlay { width: auto; }
}

/* ============================================================
   Mobile landscape — max-width: 767px  (< 768px in Bricks)
   ============================================================ */

@media (max-width: 767px) {
  .vbe-search-box--ml-field-only   { --vbe-sb-mode: field-only; }
  .vbe-search-box--ml-icon-only    { --vbe-sb-mode: icon-only; }
  .vbe-search-box--ml-icon-field   { --vbe-sb-mode: icon-field; }
  .vbe-search-box--ml-icon-overlay { --vbe-sb-mode: icon-overlay; }

  .vbe-search-box--ml-icon-only .vbe-search-box__trigger,
  .vbe-search-box--ml-icon-overlay .vbe-search-box__trigger  { display: inline-flex; }
  .vbe-search-box--ml-field-only .vbe-search-box__trigger,
  .vbe-search-box--ml-icon-field .vbe-search-box__trigger    { display: none; }

  .vbe-search-box--ml-icon-field .vbe-search-box__inline,
  .vbe-search-box--ml-field-only .vbe-search-box__inline     { display: block; flex: 1; min-width: 0; position: relative; }
  .vbe-search-box--ml-icon-only .vbe-search-box__inline,
  .vbe-search-box--ml-icon-overlay .vbe-search-box__inline   { display: none; }

  .vbe-search-box--ml-icon-field .vbe-search-box__bar-icon   { display: inline-flex; }
  .vbe-search-box--ml-field-only .vbe-search-box__bar-icon,
  .vbe-search-box--ml-icon-only .vbe-search-box__bar-icon,
  .vbe-search-box--ml-icon-overlay .vbe-search-box__bar-icon { display: none; }

  .vbe-search-box--ml-icon-field,
  .vbe-search-box--ml-field-only  { width: 100%; }
  .vbe-search-box--ml-icon-only,
  .vbe-search-box--ml-icon-overlay { width: auto; }
}

/* ============================================================
   Mobile portrait — max-width: 478px  (< 478px in Bricks)
   ============================================================ */

@media (max-width: 478px) {
  .vbe-search-box--mp-field-only   { --vbe-sb-mode: field-only; }
  .vbe-search-box--mp-icon-only    { --vbe-sb-mode: icon-only; }
  .vbe-search-box--mp-icon-field   { --vbe-sb-mode: icon-field; }
  .vbe-search-box--mp-icon-overlay { --vbe-sb-mode: icon-overlay; }

  .vbe-search-box--mp-icon-only .vbe-search-box__trigger,
  .vbe-search-box--mp-icon-overlay .vbe-search-box__trigger  { display: inline-flex; }
  .vbe-search-box--mp-field-only .vbe-search-box__trigger,
  .vbe-search-box--mp-icon-field .vbe-search-box__trigger    { display: none; }

  .vbe-search-box--mp-icon-field .vbe-search-box__inline,
  .vbe-search-box--mp-field-only .vbe-search-box__inline     { display: block; flex: 1; min-width: 0; position: relative; }
  .vbe-search-box--mp-icon-only .vbe-search-box__inline,
  .vbe-search-box--mp-icon-overlay .vbe-search-box__inline   { display: none; }

  .vbe-search-box--mp-icon-field .vbe-search-box__bar-icon   { display: inline-flex; }
  .vbe-search-box--mp-field-only .vbe-search-box__bar-icon,
  .vbe-search-box--mp-icon-only .vbe-search-box__bar-icon,
  .vbe-search-box--mp-icon-overlay .vbe-search-box__bar-icon { display: none; }

  .vbe-search-box--mp-icon-field,
  .vbe-search-box--mp-field-only  { width: 100%; }
  .vbe-search-box--mp-icon-only,
  .vbe-search-box--mp-icon-overlay { width: auto; }
}

/* ==========================================================================
   3. Search bar (unified border container)
   ========================================================================== */

.vbe-search-box__bar {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  background-color: #ffffff;
  border: 1.5px solid #e2e2e2;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden; /* clip internal elements to border-radius */
}

.vbe-search-box__bar:focus-within {
  border-color: #b0b0b0;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

/* Bar inside dropdown — slightly different radius */
.vbe-search-box__bar--dropdown {
  border-radius: 8px;
  min-height: 42px;
}

/* Bar inside overlay — transparent, no border */
.vbe-search-box__bar--overlay {
  border: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  background: transparent;
  min-height: 52px;
}

.vbe-search-box__bar--overlay:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

/* ==========================================================================
   4. Icon inside bar (icon-field appearance)
   ========================================================================== */

.vbe-search-box__bar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 14px 0 10px;
  font-size: 1rem;
  color: #999999;
  pointer-events: none; /* decorative */
  line-height: 1;
}

.vbe-search-box__bar-icon svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* ==========================================================================
   5. Input field
   ========================================================================== */

.vbe-search-box__input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 44px;
  padding-inline-start: 14px;
  padding-inline-end: 10px;
  padding-block: 0;
  margin: 0;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  font-family: inherit;
  color: inherit;
  direction: rtl;
  text-align: start;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

/* Remove browser default search clear/cancel buttons */
.vbe-search-box__input::-webkit-search-decoration,
.vbe-search-box__input::-webkit-search-cancel-button,
.vbe-search-box__input::-webkit-search-results-button,
.vbe-search-box__input::-webkit-search-results-decoration {
  display: none;
}

.vbe-search-box__input::placeholder {
  color: #bbbbbb;
  opacity: 1;
}

/* Overlay input is larger and white */
.vbe-search-box__bar--overlay .vbe-search-box__input {
  color: #ffffff;
  font-size: 1.0625rem;
  padding-inline-start: 18px;
}

.vbe-search-box__bar--overlay .vbe-search-box__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   6. Submit button (inside bar)
   ========================================================================== */

.vbe-search-box__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 100%;
  padding: 0 18px;
  border: none;
  border-inline-start: 1.5px solid #eeeeee;
  background: transparent;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  color: #444444;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.vbe-search-box__submit:hover {
  background-color: rgba(0, 0, 0, 0.04);
  color: #111111;
}

.vbe-search-box__submit:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

/* ==========================================================================
   7. Standalone trigger button (icon-only / icon-overlay modes)
   ========================================================================== */

.vbe-search-box__trigger {
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  font-size: 1.1875rem;
  color: #444444;
  line-height: 1;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.vbe-search-box__trigger:hover {
  color: #111111;
  background-color: rgba(0, 0, 0, 0.06);
}

.vbe-search-box__trigger:active {
  transform: scale(0.93);
}

.vbe-search-box__trigger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.vbe-search-box__trigger svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  pointer-events: none;
}

/* ==========================================================================
   8. Overlay close button
   ========================================================================== */

.vbe-search-box__overlay-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  margin-inline-start: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.vbe-search-box__overlay-close:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.vbe-search-box__overlay-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.vbe-search-box__overlay-close svg {
  display: block;
  fill: currentColor;
  pointer-events: none;
}

/* ==========================================================================
   9. Dropdown container (icon-only mode)
   ========================================================================== */

.vbe-search-box__dropdown {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-end: 0;
  z-index: 9999;
  width: 320px;
  background: #ffffff;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.13), 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 10px;
  animation: vbe-sb-drop-in 0.18s ease;
}

.vbe-search-box__dropdown[hidden] { display: none; }

/* Fixed mode: JS sets position:fixed + top/right via inline styles */
.vbe-search-box__dropdown--fixed {
  position: fixed !important;
}

/* Panel inside dropdown has no extra border/shadow */
.vbe-search-box__dropdown .vbe-search-box__panel {
  position: static !important;
  box-shadow: none;
  border: none;
  border-radius: 0;
  background: transparent;
}

/* ==========================================================================
   10. Results panel
   ========================================================================== */

.vbe-search-box__panel {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-start: 0;
  width: 100%;
  z-index: 9999;
  background: #ffffff;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  animation: vbe-sb-drop-in 0.18s ease;
  max-height: 420px;
  overflow-y: auto;
}

.vbe-search-box__panel[hidden] { display: none; }

/* Fixed mode: JS sets position:fixed */
.vbe-search-box__panel--fixed {
  position: fixed !important;
}

/* Panel inside overlay */
.vbe-search-box__overlay .vbe-search-box__panel {
  position: static;
  box-shadow: none;
  border: none;
  border-radius: 0;
  background: transparent;
  max-height: 55vh;
  overflow-y: auto;
  animation: none;
}

/* Thin scrollbar */
.vbe-search-box__panel::-webkit-scrollbar { width: 4px; }
.vbe-search-box__panel::-webkit-scrollbar-track { background: transparent; }
.vbe-search-box__panel::-webkit-scrollbar-thumb { background: #d8d8d8; border-radius: 4px; }
.vbe-search-box__overlay .vbe-search-box__panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }

/* ==========================================================================
   11. Status line (loading / empty / error)
   ========================================================================== */

.vbe-search-box__status {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: #999999;
  text-align: center;
  direction: rtl;
}

.vbe-search-box__status:empty { display: none; }

.vbe-search-box__overlay .vbe-search-box__status {
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   12. Results list & items
   ========================================================================== */

.vbe-search-box__results-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.vbe-search-box__result-item {
  display: block;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.vbe-search-box__result-item:hover,
.vbe-search-box__result-item[aria-selected="true"] {
  background-color: #f5f5f7;
}

.vbe-search-box__result-item:not(:last-child) {
  border-bottom: 1px solid #f2f2f2;
}

.vbe-search-box__result-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
}

/* ── Thumbnail ── */
.vbe-search-box__result-thumb {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f0f0 0%, #e4e4e4 100%);
}

.vbe-search-box__result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Text body ── */
.vbe-search-box__result-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: start;
}

.vbe-search-box__result-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Highlight matched term */
.vbe-search-box__result-title mark {
  background: none;
  color: inherit;
  font-weight: 700;
  text-underline-offset: 2px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

.vbe-search-box__result-type {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 500;
  color: #ffffff;
  background: #888888;
  border-radius: 4px;
  padding: 1px 7px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.vbe-search-box__result-excerpt {
  display: block;
  font-size: 0.775rem;
  color: #999999;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Overlay result item overrides */
.vbe-search-box__overlay .vbe-search-box__result-item:hover,
.vbe-search-box__overlay .vbe-search-box__result-item[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.07);
}

.vbe-search-box__overlay .vbe-search-box__result-item:not(:last-child) {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

.vbe-search-box__overlay .vbe-search-box__result-title {
  color: rgba(255, 255, 255, 0.9);
}

.vbe-search-box__overlay .vbe-search-box__result-excerpt {
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   13. Full-search footer link
   ========================================================================== */

.vbe-search-box__full-search:not(:empty) {
  border-top: 1px solid #f0f0f0;
}

.vbe-search-box__full-search-link {
  display: block;
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #666666;
  text-decoration: none;
  text-align: center;
  direction: rtl;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.vbe-search-box__full-search-link:hover {
  background-color: #f5f5f7;
  color: #111111;
}

.vbe-search-box__overlay .vbe-search-box__full-search:not(:empty) {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.vbe-search-box__overlay .vbe-search-box__full-search-link {
  color: rgba(255, 255, 255, 0.65);
}

.vbe-search-box__overlay .vbe-search-box__full-search-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

/* ==========================================================================
   14. Full-screen overlay (icon-overlay mode)
   ========================================================================== */

.vbe-search-box__overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 10, 20, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-block-start: 72px;
  padding-inline: 20px;
  direction: rtl;
  animation: vbe-sb-overlay-in 0.22s ease;
}

.vbe-search-box__overlay[hidden] { display: none; }

.vbe-search-box__overlay-inner {
  width: 100%;
  max-width: 700px;
  background: #111827;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.2);
  animation: vbe-sb-slide-down 0.22s ease;
}

/* ==========================================================================
   15. Animations
   ========================================================================== */

@keyframes vbe-sb-drop-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes vbe-sb-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes vbe-sb-slide-down {
  from { opacity: 0; transform: translateY(-20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ==========================================================================
   16. Responsive layout tweaks (non-mode-visibility rules)
   ========================================================================== */

@media (max-width: 767px) {
  .vbe-search-box__dropdown {
    width: calc(100vw - 32px);
    inset-inline-end: 50%;
    transform: translateX(50%);
  }

  /* When JS applies fixed positioning, clear the transform */
  .vbe-search-box__dropdown--fixed {
    transform: none !important;
    inset-inline-start: 16px !important;
    inset-inline-end: 16px !important;
    width: auto !important;
  }

  .vbe-search-box__overlay {
    padding-block-start: 48px;
    padding-inline: 8px;
  }

  .vbe-search-box__overlay-inner {
    border-radius: 12px;
  }
}

@media (max-width: 478px) {
  .vbe-search-box__result-thumb {
    display: none;
  }

  .vbe-search-box__overlay {
    padding-block-start: 0;
    padding-inline: 0;
    align-items: flex-start;
  }

  .vbe-search-box__overlay-inner {
    border-radius: 0 0 16px 16px;
    width: 100%;
    max-width: 100%;
  }
}
