/* 2.9.60 — isolate the mobile search from theme grid gutters and button heights.
 * Loaded after the existing mobile releases. All rules are component-scoped
 * and inactive above 860px. No Elementor content or search data is rewritten.
 */
@media (max-width: 860px) {
  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .searchForm.bt-ai-search-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }

  /* .row is also used by many themes. Its negative gutters must not enter
     this grid. Clearfix pseudo-elements otherwise become extra grid cells. */
  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .searchForm.bt-ai-search-form > .row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .searchForm.bt-ai-search-form > .row::before,
  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .searchForm.bt-ai-search-form > .row::after {
    content: none !important;
    display: none !important;
  }

  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .searchForm.bt-ai-search-form input,
  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .searchForm.bt-ai-search-form select {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    border: 1px solid #d9e1e3 !important;
    border-radius: 10px !important;
    background-color: #f8fafb !important;
    color: #172125 !important;
    -webkit-text-fill-color: #172125 !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
  }
  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .searchForm.bt-ai-search-form select {
    appearance: auto !important;
    -webkit-appearance: menulist !important;
  }
  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .searchForm.bt-ai-search-form input::placeholder {
    color: #5e6a70 !important;
    -webkit-text-fill-color: #5e6a70 !important;
    opacity: 1 !important;
    font-size: 16px !important;
    letter-spacing: normal !important;
  }

  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .searchForm.bt-ai-search-form button[type="submit"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 12px 10px !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--mint, #64eacd) !important;
    color: #07120f !important;
    -webkit-text-fill-color: #07120f !important;
    font-size: 16px !important;
    font-weight: 750 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    white-space: normal !important;
  }

  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .bt-ai-pills {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 14px 0 0 !important;
    padding: 0 !important;
  }
  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .bt-ai-pills .pill {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(255, 255, 255, .22) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .045) !important;
    color: #e8eeee !important;
    -webkit-text-fill-color: #e8eeee !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .bt-ai-pills .pill.is-active {
    background: var(--mint, #64eacd) !important;
    border-color: var(--mint, #64eacd) !important;
    color: #07120f !important;
    -webkit-text-fill-color: #07120f !important;
  }
  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .searchForm.bt-ai-search-form :is(input, select, button):focus-visible,
  :is(body.home, .bt-v299-key-branchensuche .bt2954-search-embed, .bt-ai-search-full) .bt-ai-pills .pill:focus-visible {
    outline: 2px solid var(--mint2, #20ad96) !important;
    outline-offset: 2px !important;
  }

  /* Only this plugin's closed launcher is affected. An open dialog and
     third-party chat widgets are deliberately left untouched. */
  html.bt-mobile-search-visible #bt-first-conversation-assistant[data-state="closed"] .bt-first-conversation-launcher {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
