.x3-global-search,
.x3-global-search * {
  box-sizing: border-box;
}

.elementor-widget-x3_global_search {
  width: auto !important;
  flex: 0 0 auto;
}

.elementor-widget-x3_global_search:has(.x3-global-search--bar) {
  width: 100% !important;
  flex: 1 1 auto;
}

.x3-global-search {
  --x3-gs-trigger-bg: rgba(255, 255, 255, .20);
  --x3-gs-trigger-text: #647084;
  --x3-gs-overlay-bg: rgba(15, 23, 42, .38);
  --x3-gs-panel-bg: rgba(255, 255, 255, .96);
  --x3-gs-input-bg: #f8fafc;
  color: #111827;
}

.x3-global-search--floating {
  --x3-gs-float-top: 280px;
  --x3-gs-float-opacity: 1;
  position: fixed;
  z-index: 9998;
  top: var(--x3-gs-float-top);
  left: 0;
  right: 0;
  width: max-content;
  max-width: calc(100vw - 32px);
  opacity: var(--x3-gs-float-opacity);
  margin-inline: auto;
  transform: none;
  transition: top .16s ease-out, opacity .2s ease;
}

.x3-global-search--floating.is-open {
  isolation: isolate;
}

.x3-global-search--floating.is-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(7, 11, 18, .12);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  animation: x3GlobalSearchScrimIn .18s ease both;
}

.x3-global-search--floating .x3-global-search-overlay {
  position: absolute;
  inset: 0 auto auto 50%;
  width: min(540px, calc(100vw - 32px));
  height: auto;
  transform: translateX(-50%);
  isolation: auto;
}

.x3-global-search--floating .x3-global-search-scrim {
  display: none;
}

.x3-global-search--floating .x3-global-search-panel {
  width: 100%;
  max-height: min(68dvh, 650px);
  margin: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  border-color: rgba(255, 255, 255, .5);
  border-radius: 18px;
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .16), inset 0 1px 0 rgba(255, 255, 255, .56);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  padding: 10px;
}

.x3-global-search-overlay--floating .x3-global-search-panel {
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .16), inset 0 1px 0 rgba(255, 255, 255, .56);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.x3-global-search-overlay--floating .x3-global-search-input-wrap {
  background: rgba(255, 255, 255, .38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .58);
}

.x3-global-search--floating .x3-global-search-input-wrap {
  min-height: 42px;
  border-color: rgba(255, 255, 255, .44);
  background: rgba(255, 255, 255, .38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .58);
}

.x3-global-search--floating .x3-global-search-input {
  min-height: 40px;
  color: #536174;
}

.x3-global-search--floating .x3-global-search-results {
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 768px) {
.x3-global-search--floating.is-open .x3-global-search-trigger {
  opacity: 0;
  pointer-events: none;
  transform: none;
  }
}

.x3-global-search-trigger,
.x3-global-search-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  background: var(--x3-gs-trigger-bg);
  color: var(--x3-gs-trigger-text);
  padding: 0 15px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .13), inset 0 1px 0 rgba(255, 255, 255, .36);
  backdrop-filter: blur(14px) saturate(132%);
  -webkit-backdrop-filter: blur(14px) saturate(132%);
  transition: transform .18s ease, box-shadow .22s ease, background-color .22s ease, border-color .22s ease;
}

.x3-global-search-trigger:hover,
.x3-global-search-inline:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .54);
  border-color: rgba(255, 255, 255, .92);
  box-shadow: 0 0 18px rgba(255, 255, 255, .58), 0 5px 16px rgba(15, 23, 42, .18), inset 0 1px 0 rgba(255, 255, 255, .68);
}

@media (max-width: 767px) {
  .x3-global-search--floating {
    top: auto;
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
    max-width: calc(100vw - 28px);
  }

  .x3-global-search--floating.is-open {
    opacity: 0;
    pointer-events: none;
    transform: none;
  }

  .x3-global-search--floating .x3-global-search-overlay,
  .x3-global-search-overlay--floating {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    transform: none;
  }

  .x3-global-search--floating .x3-global-search-scrim,
  .x3-global-search-overlay--floating .x3-global-search-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(7, 11, 18, .16);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
  }

  .x3-global-search--floating .x3-global-search-panel,
  .x3-global-search-overlay--floating .x3-global-search-panel {
    grid-template-rows: auto auto minmax(0, 1fr);
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: max(18px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  }

  .x3-global-search-overlay--floating .x3-global-search-input-wrap {
    min-height: 52px;
  }

  .x3-global-search-overlay--floating .x3-global-search-results {
    min-height: 0;
    grid-template-columns: 1fr;
    align-content: start;
  }

  /* The mobile launcher becomes the search surface itself. Its portalled
   * overlay starts around screen centre for typing, then lifts on input so
   * results stay above the keyboard instead of becoming a second top bar. */
  .x3-global-search-overlay--floating {
    position: fixed;
    inset: auto;
    top: calc(50dvh - 34px);
    left: 50%;
    width: min(calc(100vw - 28px), 540px);
    height: auto;
    transform: translateX(-50%);
    transition: top .24s ease, transform .24s ease, opacity .18s ease, visibility 0s linear .18s;
  }

  .x3-global-search-overlay--floating.x3-global-search-has-query {
    top: max(18px, calc(env(safe-area-inset-top) + 12px));
    transform: translateX(-50%);
  }

  .x3-global-search-overlay--floating .x3-global-search-scrim { display: block; }

  .x3-global-search-overlay--floating .x3-global-search-panel {
    width: 100%;
    min-height: 0;
    max-height: min(68dvh, 620px);
    margin: 0;
    grid-template-rows: auto;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .24);
  }

  .x3-global-search-overlay--floating.x3-global-search-has-query .x3-global-search-panel {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  /* Before a query exists, the panel only hosts the input. Do not leave a
   * second translucent rectangle behind the rounded search control. */
  .x3-global-search-overlay--floating:not(.x3-global-search-has-query) {
    box-shadow: none;
  }

  .x3-global-search-overlay--floating:not(.x3-global-search-has-query) .x3-global-search-panel {
    overflow: visible;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0;
  }

  .x3-global-search-overlay--floating .x3-global-search-input-wrap {
    min-height: 48px;
  }

  .x3-global-search-overlay--floating .x3-global-search-input {
    min-height: 44px;
    font-size: 16px;
  }

  .x3-global-search-overlay--floating:not(.x3-global-search-has-query) .x3-global-search-state,
  .x3-global-search-overlay--floating:not(.x3-global-search-has-query) .x3-global-search-results {
    display: none;
  }

  .x3-global-search-overlay--floating.x3-global-search-has-query .x3-global-search-results {
    max-height: min(54dvh, 500px);
  }
}

.x3-global-search-inline {
  width: 100%;
  justify-content: flex-start;
  background: var(--x3-gs-input-bg);
  color: #64748b;
  box-shadow: inset 0 1px 4px rgba(15, 23, 42, .12);
}

.x3-global-search-icon {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.x3-global-search-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.x3-global-search-icon::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: center;
}

.x3-global-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  visibility: hidden;
  pointer-events: none;
  isolation: isolate;
  /* Do not fade this ancestor. Chromium can defer a descendant's
   * backdrop-filter until an ancestor opacity animation has completed. */
  transition: visibility 0s linear .18s;
}

.x3-global-search.is-open .x3-global-search-overlay,
.x3-global-search-overlay.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

/* Keep the real glass surface in the compositor before it is interacted with. */
.x3-global-search-overlay.is-prewarming {
  visibility: visible;
  pointer-events: none;
  transition: none;
}

.x3-global-search-scrim {
  position: absolute;
  inset: 0;
  background: var(--x3-gs-overlay-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .18s ease;
}

.x3-global-search-overlay.is-open .x3-global-search-scrim {
  opacity: 1;
}

.x3-global-search-overlay.is-closing .x3-global-search-panel {
  opacity: 0;
  transition: opacity .18s ease;
}

.x3-global-search-panel {
  position: relative;
  width: min(980px, calc(100vw - 28px));
  max-height: min(82dvh, 780px);
  margin: max(18px, env(safe-area-inset-top)) auto 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 18px;
  background: var(--x3-gs-panel-bg);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  padding: 16px;
  transform: translateY(-14px) scale(.985);
  transition: transform .22s ease;
}

.x3-global-search.is-open .x3-global-search-panel,
.x3-global-search-overlay.is-open .x3-global-search-panel {
  transform: translateY(0);
}

.x3-global-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.x3-global-search-head h3 {
  margin: 0;
  font-family: "Libre Bodoni", serif;
  font-size: 28px;
  font-style: italic;
  line-height: 1.1;
  text-shadow: 0 0 3px rgba(0, 0, 0, .28);
}

.x3-global-search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, color .18s ease;
}

.x3-global-search-close:hover {
  transform: scale(1.08);
}

.x3-global-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 999px;
  background: var(--x3-gs-input-bg);
  box-shadow: inset 0 1px 4px rgba(15, 23, 42, .12);
  padding: 0 16px;
}

.x3-global-search-input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 17px;
}

.x3-global-search-state {
  min-height: 18px;
  color: #64748b;
  font-size: 13px;
}

.x3-global-search-state.is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.x3-global-search-loader {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 34px;
  overflow: hidden;
  color: #111827;
}

.x3-global-search-loader-star {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 1em;
  height: 1em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 7px rgba(15, 23, 42, .18);
}

.x3-global-search-loader-star--large {
  z-index: 2;
  color: #111827;
  font-size: 28px;
  transform: translate(-50%, -50%);
  animation: x3GlobalSearchCorePulse 1.55s ease-in-out infinite;
}

.x3-global-search-loader-star--small {
  z-index: 1;
  color: #647084;
  font-size: 13px;
  opacity: 0;
}

.x3-global-search-loader-star--one {
  animation: x3GlobalSearchOrbitOne 1.55s cubic-bezier(.45, 0, .2, 1) infinite;
}

.x3-global-search-loader-star--two {
  animation: x3GlobalSearchOrbitTwo 1.55s cubic-bezier(.45, 0, .2, 1) infinite;
}

.x3-global-search-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  overflow: auto;
  padding: 2px 2px 8px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.x3-global-search-section {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
}

.x3-global-search-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.x3-global-search-section-title {
  margin: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.x3-global-search-section-list {
  display: grid;
  gap: 8px;
}

.x3-global-search-section[data-source="products"] {
  grid-column: span 2;
}

.x3-global-search-section[data-source="products"] .x3-global-search-section-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.x3-global-search-result {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  color: inherit;
  padding: 8px;
  text-decoration: none !important;
  box-shadow: 0 0 9px rgba(0, 0, 0, .08);
  animation: x3GlobalSearchResultIn .2s ease both;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.x3-global-search-section[data-source="products"] .x3-global-search-result {
  grid-template-columns: 1fr;
  align-content: start;
  gap: 9px;
  min-height: 100%;
  padding: 9px;
}

.x3-global-search-result:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, .16);
  box-shadow: 0 0 14px rgba(0, 0, 0, .12);
}

.x3-global-search-thumb {
  display: block;
  width: 58px;
  height: 52px;
  overflow: hidden;
  border-radius: 9px;
  background: #e5e7eb;
}

.x3-global-search-section[data-source="products"] .x3-global-search-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1.16 / 1;
  border-radius: 10px;
  background: #eef1f5;
}

.x3-global-search-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.x3-global-search-thumb-empty {
  background: linear-gradient(135deg, #e5e7eb, #f8fafc);
}

.x3-global-search-result-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.x3-global-search-section[data-source="products"] .x3-global-search-result-copy {
  gap: 3px;
}

.x3-global-search-section[data-source="products"] .x3-global-search-result-title {
  font-size: 14px;
  line-height: 1.25;
}

.x3-global-search-section[data-source="products"] .x3-global-search-result-meta {
  margin-top: 2px;
}

.x3-global-search-result-kicker {
  color: #dc2626;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.x3-global-search-result-title,
.x3-global-search-result-sub,
.x3-global-search-result-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x3-global-search-result-title {
  color: #111827;
  font-size: 14px;
  line-height: 1.15;
}

.x3-global-search-result-sub,
.x3-global-search-result-meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.x3-global-search-section-empty {
  border: 1px dashed rgba(100, 116, 139, .28);
  border-radius: 12px;
  color: #64748b;
  padding: 12px;
  font-size: 13px;
}

.x3-global-search.is-searching .x3-global-search-results {
  opacity: .52;
  pointer-events: none;
}

body.x3-global-search-open {
  overflow: hidden !important;
  touch-action: none;
}

@keyframes x3GlobalSearchResultIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes x3GlobalSearchScrimIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes x3GlobalSearchCorePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  45% { transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes x3GlobalSearchOrbitOne {
  0%, 11%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.18); }
  19% { opacity: 1; transform: translate(-50%, -50%) translateX(11px) translateY(-4px) scale(1); }
  42% { opacity: 1; transform: translate(-50%, -50%) translateX(-11px) translateY(-10px) scale(1); }
  67% { opacity: 1; transform: translate(-50%, -50%) translateX(-11px) translateY(10px) scale(1); }
  86% { opacity: 1; transform: translate(-50%, -50%) translateX(8px) translateY(6px) scale(.82); }
}

@keyframes x3GlobalSearchOrbitTwo {
  0%, 11%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.18); }
  19% { opacity: 1; transform: translate(-50%, -50%) translateX(-10px) translateY(6px) scale(.82); }
  42% { opacity: 1; transform: translate(-50%, -50%) translateX(11px) translateY(10px) scale(1); }
  67% { opacity: 1; transform: translate(-50%, -50%) translateX(10px) translateY(-10px) scale(1); }
  86% { opacity: 1; transform: translate(-50%, -50%) translateX(-8px) translateY(-4px) scale(.82); }
}

@media (prefers-reduced-motion: reduce) {
  .x3-global-search-loader-star { animation: none !important; }
  .x3-global-search-loader-star--small { opacity: 1; }
  .x3-global-search-loader-star--one { transform: translate(-50%, -50%) translateX(-13px); }
  .x3-global-search-loader-star--two { transform: translate(-50%, -50%) translateX(13px); }
}

@media (min-width: 768px) and (max-width: 860px) {
  .x3-global-search-results {
    grid-template-columns: 1fr;
  }
  .x3-global-search-section[data-source="products"] {
    grid-column: span 1;
  }
  .x3-global-search-panel {
    width: calc(100vw - 20px);
    margin-top: max(10px, env(safe-area-inset-top));
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 14px;
    gap: 11px;
  }
  .x3-global-search-head h3 {
    font-size: 24px;
  }
  .x3-global-search-input-wrap {
    min-height: 48px;
    padding-inline: 14px;
  }
  .x3-global-search-input {
    min-height: 44px;
    font-size: 16px;
  }
}

/* This needs to follow the base overlay rules so the mobile launcher does
 * not inherit the old full-screen search sheet dimensions. */
@media (max-width: 767px) {
  .x3-global-search-section[data-source="products"] {
    grid-column: span 1;
  }

  .x3-global-search-overlay--floating {
    position: fixed;
    inset: auto;
    top: 50dvh;
    left: 50%;
    width: min(calc(100vw - 28px), 540px);
    height: auto;
    transform: translate(-50%, -50%);
  }

  .x3-global-search-overlay--floating.x3-global-search-has-query {
    top: max(18px, calc(env(safe-area-inset-top) + 12px));
    transform: translateX(-50%);
  }

  .x3-global-search-overlay--floating .x3-global-search-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(7, 11, 18, .16);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
  }

  .x3-global-search-overlay--floating .x3-global-search-panel {
    width: 100%;
    min-height: 0;
    max-height: min(68dvh, 620px);
    margin: 0;
    grid-template-rows: auto;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .24);
  }

  .x3-global-search-overlay--floating.x3-global-search-has-query .x3-global-search-panel {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .x3-global-search-overlay--floating .x3-global-search-head {
    top: 8px;
    right: 8px;
  }

  .x3-global-search-overlay--floating .x3-global-search-input-wrap {
    min-height: 48px;
    padding-right: 46px;
  }

  .x3-global-search-overlay--floating .x3-global-search-input {
    min-height: 44px;
    font-size: 16px;
  }

  .x3-global-search-overlay--floating:not(.x3-global-search-has-query) .x3-global-search-state,
  .x3-global-search-overlay--floating:not(.x3-global-search-has-query) .x3-global-search-results {
    display: none;
  }

  .x3-global-search-overlay--floating.x3-global-search-has-query .x3-global-search-results {
    max-height: min(54dvh, 500px);
  }
}

/* Final mobile override after the base overlay rules. */
@media (max-width: 767px) {
  .x3-global-search-overlay--floating {
    top: calc(50dvh - 34px);
    left: max(14px, calc((100vw - 540px) / 2));
    right: max(14px, calc((100vw - 540px) / 2));
    width: auto;
    transform: none !important;
    border-radius: 18px;
    box-shadow: none;
    transition: transform .32s cubic-bezier(.22, .72, .22, 1), top .32s cubic-bezier(.22, .72, .22, 1), opacity .2s ease, visibility 0s linear .2s;
    will-change: top;
  }

  /* Backdrop is enabled first, then JavaScript adds this class two frames
   * later to begin the physical move. */
  .x3-global-search-overlay--floating.x3-global-search-has-query {
    top: calc(50dvh - 34px);
  }

  .x3-global-search-overlay--floating.x3-global-search-results-positioned {
    top: max(18px, calc(env(safe-area-inset-top) + 12px));
  }

  .x3-global-search-overlay--floating .x3-global-search-panel {
    border: 1px solid rgba(255, 255, 255, .58) !important;
    border-radius: 18px !important;
    /* The portal layer already supplies separation from the page. Keeping an
     * outer panel shadow here creates a dark second edge around rounded glass
     * corners on mobile browsers. */
    /* The portal copies the configured glass background inline, so this must
     * win the shorthand reset from that inline background declaration. */
    background-clip: padding-box !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .56) !important;
    z-index: 1;
    isolation: isolate;
  }

  /* Backdrop-filter cannot be smoothly interpolated by Chromium. Keep a
   * dedicated veil composited from the start, then fade its contribution in
   * while the search surface opens or changes size. */
  .x3-global-search-overlay--floating .x3-global-search-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: inherit;
    background: rgba(255, 255, 255, .45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .56);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    opacity: 1;
    transition: opacity .2s ease;
    will-change: opacity;
  }

  .x3-global-search-overlay--floating .x3-global-search-panel > * {
    position: relative;
    z-index: 1;
  }

  .x3-global-search-overlay--floating.x3-global-search-has-query .x3-global-search-panel {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .x3-global-search-overlay--floating.x3-global-search-has-query .x3-global-search-panel::before {
    opacity: 1;
  }

  /* Do not trap the full-screen scrim inside the moving search container. */
  .x3-global-search-overlay--floating .x3-global-search-scrim {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw;
    height: 100dvh;
    z-index: 0;
  }

  .x3-global-search-overlay--floating:not(.x3-global-search-has-query) {
    box-shadow: none;
  }

  .x3-global-search-overlay--floating:not(.x3-global-search-has-query) .x3-global-search-panel {
    overflow: visible;
    border-radius: 999px !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0;
  }
}

/* Animate the overlay container, never the glass surface itself. Chromium
 * can defer backdrop-filter painting while the filtered element transforms. */
.x3-global-search--floating .x3-global-search-panel,
.x3-global-search-overlay--floating .x3-global-search-panel {
  transform: none !important;
  transition: none !important;
}
