/* BeliTech 4.17.15 – mobile/tablet liquid glass.
   Scoped to public-facing Explorer, Licensed Operators, and shared headers.
   Desktop >1023px and dashboard/listing data surfaces retain their approved styles.
   A glass finish is progressive enhancement; readable opaque fallback is maintained.
*/

@media (max-width:1023px) {
  body:not(.wp-admin) {
    --bt-glass-fill:rgba(255,255,255,0.7);
    --bt-glass-fill-strong:rgba(255,255,255,0.84);
    --bt-glass-stroke:rgba(255,255,255,.80);
    --bt-glass-ink:#0d2b48;
    --bt-glass-shadow:0 12px 30px rgba(13,43,72,0.16),inset 0 1px rgba(255,255,255,.54);
  }

  /* WordPress/PHP and React headers should use the same translucent surface. */
  body:is(body,#belitec-desktop-scope):not(.wp-admin) :is(.bst-php-header,#bst-marketplace-root#bst-marketplace-root .bst-app-header--marketplace) {
    background:var(--bt-glass-fill-strong)!important;
    border-bottom:1px solid rgba(221,225,229,0.85)!important;
    box-shadow:0 5px 18px rgba(13,43,72,0.07)!important;
  }
  body:is(body,#belitec-desktop-scope):not(.wp-admin) :is(.bst-php-header,#bst-marketplace-root#bst-marketplace-root .bst-app-header--marketplace) .bst-role-nav {
    background:transparent!important;
    border-color:rgba(221,225,229,0.72)!important;
  }
  body:is(body,#belitec-desktop-scope):not(.wp-admin) :is(.bst-php-header,#bst-marketplace-root#bst-marketplace-root .bst-app-header--marketplace) :is(.bt-header-account>summary,.bst-php-header__signin,.bst-header-signin,.bt-header-notifications button,.bt-notification-bell) {
    background:rgba(255,255,255,.73)!important;
    border:1px solid rgba(255,255,255,.92)!important;
    box-shadow:0 3px 11px rgba(13,43,72,0.09)!important;
    color:#0d2b48!important;
  }

  /* Explorer hero: background art remains the underlying image, never blurred. */
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-airbnb-search-stage .bst-search-v2,
  body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero .bt-od-hero-search {
    position:relative!important;
    isolation:isolate;
    background:var(--bt-glass-fill)!important;
    border:1px solid var(--bt-glass-stroke)!important;
    border-radius:20px!important;
    box-shadow:var(--bt-glass-shadow)!important;
    overflow:visible!important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-search-v2 .bst-airbnb-search-segment,
  body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero-search__field {
    background:transparent!important;
    box-shadow:none!important;
    min-width:0!important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-search-v2 .bst-airbnb-search-segment>span,
  body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero-search__field>span {
    color:#0d2b48!important;
    opacity:1!important;
    text-shadow:none!important;
    font-weight:800!important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-search-v2 .bst-airbnb-search-segment :is(input,select),
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-search-v2 .bst-guest-stepper__controls,
  body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero-search__field :is(input,select) {
    background:rgba(255,255,255,.77)!important;
    color:#0d2b48!important;
    border:1px solid rgba(202,208,215,0.91)!important;
    border-radius:12px!important;
    box-shadow:inset 0 1px rgba(255,255,255,.6)!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-search-v2 input::placeholder,
  body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero-search__field input::placeholder {
    color:#4e6479!important;
    opacity:1!important;
  }
  /* High-contrast CTAs, regardless of the glass behind them. */
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-search-v2 .bst-airbnb-search-button,
  body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero-search__submit {
    background:#0d2b48!important;
    border:1px solid #0d2b48!important;
    color:#fff!important;
    border-radius:12px!important;
    box-shadow:0 3px 9px rgba(13,43,72,0.17)!important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-search-v2 :is(input,button):focus-visible,
  body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero-search :is(input,select,button):focus-visible {
    outline:3px solid #0d2b48!important;
    outline-offset:2px!important;
  }
  /* The trust strip becomes a lighter surface without hiding its real text. */
  body:not(.wp-admin) :is(#bst-marketplace-root#bst-marketplace-root,#bt-editorial-directory.bt-od) .bst-master-trust-strip.bst-master-trust-strip--native {
    background:rgba(255,255,255,0.85)!important;
  }
  body:not(.wp-admin) :is(#bst-marketplace-root#bst-marketplace-root,#bt-editorial-directory.bt-od) .bst-master-trust-strip--native .bst-trust-copy :is(strong,small) {
    color:#0d2b48!important;
    text-shadow:none!important;
  }
  /* Account dropdown is readable even when opened over busy scenery. */
  body:is(body,#belitec-desktop-scope):not(.wp-admin) :is(.bst-php-header,#bst-marketplace-root#bst-marketplace-root .bst-app-header--marketplace) .bt-header-account>nav {
    background:rgba(255,255,255,0.9)!important;
    border-color:rgba(255,255,255,.92)!important;
    box-shadow:0 15px 40px rgba(13,43,72,0.18)!important;
  }
  body:is(body,#belitec-desktop-scope):not(.wp-admin) :is(.bst-php-header,#bst-marketplace-root#bst-marketplace-root .bst-app-header--marketplace) .bt-header-account>nav a {
    color:#0d2b48!important;
  }
  /* Explorer fixed HUD: cards behind it remain faintly visible when scrolling. */
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-bottom-nav {
    background:rgba(255,255,255,0.76)!important;
    border-top:1px solid rgba(255,255,255,.86)!important;
    box-shadow:0 -8px 25px rgba(13,43,72,0.15),inset 0 1px rgba(255,255,255,.5)!important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-bottom-nav>button {
    color:#0d2b48!important;
    background:transparent!important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-bottom-nav>button.text-teal-700 {
    color:#0d2b48!important;
    background:rgba(255,255,255,.60)!important;
    border:1px solid rgba(255,255,255,.70)!important;
    box-shadow:0 1px 8px rgba(13,43,72,0.05)!important;
  }
  /* Only blur the panels, never the hero image, which preserves image sharpness. */
  @supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))) {
    body:is(body,#belitec-desktop-scope):not(.wp-admin) :is(.bst-php-header,#bst-marketplace-root#bst-marketplace-root .bst-app-header--marketplace) {
      -webkit-backdrop-filter:blur(14px) saturate(145%)!important;
      backdrop-filter:blur(14px) saturate(145%)!important;
    }
    body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-airbnb-search-stage .bst-search-v2,
    body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero .bt-od-hero-search {
      -webkit-backdrop-filter:blur(16px) saturate(145%)!important;
      backdrop-filter:blur(16px) saturate(145%)!important;
    }
    body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-bottom-nav,
    body:is(body,#belitec-desktop-scope):not(.wp-admin) :is(.bst-php-header,#bst-marketplace-root#bst-marketplace-root .bst-app-header--marketplace) .bt-header-account>nav {
      -webkit-backdrop-filter:blur(16px) saturate(145%)!important;
      backdrop-filter:blur(16px) saturate(145%)!important;
    }
  }
}

/* Phone: more visible scenery through the search panels, but readable inputs. */
@media (max-width:767px) {
  body:not(.wp-admin) {
    --bt-glass-fill:rgba(255,255,255,0.62);
    --bt-glass-fill-strong:rgba(255,255,255,0.83);
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-airbnb-search-stage .bst-search-v2,
  body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero .bt-od-hero-search {
    border-radius:22px!important;
    padding:18px!important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-search-v2 .bst-airbnb-search-segment,
  body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero-search__field {
    border:0!important;
    padding:0!important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-search-v2 .bst-airbnb-search-segment :is(input,select),
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-search-v2 .bst-guest-stepper__controls,
  body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero-search__field :is(input,select) {
    min-height:48px!important;
    font-size:16px!important;
  }
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-bottom-nav>button {
    min-height:56px!important;
  }
}

/* Explicit accessibility fallback for users who request reduced transparency. */
@media (prefers-reduced-transparency:reduce) and (max-width:1023px) {
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-airbnb-search-stage .bst-search-v2,
  body:not(.wp-admin) #bt-editorial-directory.bt-od .bt-od-hero .bt-od-hero-search,
  body:not(.wp-admin) #bst-marketplace-root#bst-marketplace-root .bst-bottom-nav,
  body:is(body,#belitec-desktop-scope):not(.wp-admin) :is(.bst-php-header,#bst-marketplace-root#bst-marketplace-root .bst-app-header--marketplace) {
    background:rgba(255,255,255,0.97)!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }
}
