/* Branchentrainer Mobile Root Fix 1.0.0.
   No desktop layout changes, no content hiding to mask grid overflow. */
@media (max-width:900px) {
  body.bt-mobile-root-fix {
    --btmr-bottom-space:72px;
    --btmr-header-offset:112px;
    padding-bottom:calc(var(--btmr-page-padding, 0px) + var(--btmr-bottom-space) + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.bt-mobile-root-fix .bt-main section[id],
  body.bt-mobile-root-fix .bt-subpage-widget section[id] {
    scroll-margin-top:calc(var(--btmr-header-offset) + 12px);
    scroll-margin-bottom:calc(var(--btmr-bottom-space) + 12px);
  }

  /* 1fr alone retains the children's automatic minimum. Explicit zero min tracks
     and shrinkable grid children remove the measured 640px mobile content width. */
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark {
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin-inline:0 !important;
    padding:28px 18px !important;
    gap:24px !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark::before,
  body.bt-mobile-root-fix .bt-widget-section .platform.dark::before { display:none !important; }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark > *,
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark :is(.flow, .leadinfoVisual, .browserMock, .browserBody, .companyCard),
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark :is(.flow, .browserBody, .companyCard) > * {
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark h2 {
    width:auto !important;
    max-width:100% !important;
    min-width:0 !important;
    color:#fff !important;
    -webkit-text-fill-color:#fff !important;
    font-size:clamp(28px, 7.3vw, 36px) !important;
    line-height:1.13 !important;
    letter-spacing:-.025em !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;
    opacity:1 !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark > div > p {
    color:#d8e1e3 !important;
    -webkit-text-fill-color:#d8e1e3 !important;
    width:auto !important;
    max-width:100% !important;
    min-width:0 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    font-size:16px !important;
    line-height:1.6 !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .eyebrow {
    color:#64eacd !important;
    -webkit-text-fill-color:#64eacd !important;
    white-space:normal !important;
    overflow-wrap:anywhere;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark :is(.flow, .leadinfoVisual) {
    width:100% !important;
    padding:12px !important;
    margin:0 !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .bt-gold-badge {
    max-width:100% !important;
    width:fit-content !important;
    box-sizing:border-box !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .bt-gold-badge img {
    max-width:100% !important;
    width:auto !important;
    height:auto !important;
    object-fit:contain !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .bt-leadinfo-visual-steps {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-auto-flow:row !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    gap:12px !important;
    padding:0 !important;
    margin:0 0 16px !important;
    overflow:visible !important;
    scroll-snap-type:none !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .bt-leadinfo-visual-step {
    display:grid !important;
    grid-template-columns:44px minmax(0,1fr) !important;
    grid-template-rows:auto auto auto !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    min-height:0 !important;
    padding:14px 12px !important;
    gap:3px 12px !important;
    box-sizing:border-box !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .bt-leadinfo-visual-step::before { display:none !important; }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .bt-leadinfo-visual-step img {
    width:44px !important;
    height:44px !important;
    min-width:0 !important;
    grid-column:1 !important;
    grid-row:1 / 4 !important;
    object-fit:contain !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .bt-leadinfo-visual-step :is(small, strong, span) {
    min-width:0 !important;
    max-width:100% !important;
    grid-column:2 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .bt-leadinfo-visual-step strong {
    color:#142126 !important;
    -webkit-text-fill-color:#142126 !important;
    font-size:16px !important;
    line-height:1.3 !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .bt-leadinfo-visual-step span {
    color:#56656a !important;
    -webkit-text-fill-color:#56656a !important;
    font-size:14px !important;
    line-height:1.5 !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .browserMock {
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .browserBody {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    width:100% !important;
    gap:12px !important;
    padding:12px !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .browserBody img {
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    object-fit:contain !important;
    transform:none !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .companyCard :is(strong, small, p) {
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    color:#26383d !important;
    -webkit-text-fill-color:#26383d !important;
    line-height:1.5 !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark .companyCard strong {font-size:16px !important;}

  /* Same containment for the homepage CRM, without changing its content. */
  body.bt-mobile-root-fix .bt-widget-section .platform.dark {
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    margin-inline:0 !important;
    padding:28px 16px !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .platformGrid {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:22px !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .platformGrid > *,
  body.bt-mobile-root-fix .bt-widget-section .platformGrid .bt-crm-capabilities > * {
    min-width:0 !important;
    max-width:100% !important;
    grid-column:auto !important;
    box-sizing:border-box !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .platformIntro h2 {
    color:#fff !important;
    -webkit-text-fill-color:#fff !important;
    font-size:clamp(28px,7.3vw,36px) !important;
    line-height:1.15 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .platformIntro h2 span {
    color:#64eacd !important;
    -webkit-text-fill-color:#64eacd !important;
  }
  body.bt-mobile-root-fix .bt-widget-section .platformGrid .productPanel {padding:14px !important;}
  body.bt-mobile-root-fix .bt-widget-section .platformGrid :is(p, strong, span) {overflow-wrap:anywhere;}

  /* The existing search look is retained. Cancel theme .row gutters and button
     hover overrides; readable 16px inputs rather than shrinking text to fit. */
  body.bt-mobile-root-fix :is(.bt-widget-section, .bt-subpage-widget) .searchForm {
    box-sizing:border-box !important;
    min-width:0 !important;
    width:100% !important;
    max-width:100% !important;
  }
  body.bt-mobile-root-fix :is(.bt-widget-section, .bt-subpage-widget) .searchForm .row {
    margin:0 !important;
    padding:0 !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    grid-template-columns:minmax(0,1fr) !important;
    box-sizing:border-box !important;
  }
  body.bt-mobile-root-fix :is(.bt-widget-section, .bt-subpage-widget) .searchForm :is(input, select) {
    margin:0 !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    font-size:16px !important;
    box-sizing:border-box !important;
  }
  body.bt-mobile-root-fix :is(.bt-widget-section, .bt-subpage-widget) .searchForm button[type=submit],
  body.bt-mobile-root-fix .bt-widget-section .leadinfo.dark a.btn.primary {
    background:#64eacd !important;
    color:#07120f !important;
    -webkit-text-fill-color:#07120f !important;
    border-color:#64eacd !important;
    white-space:normal !important;
    max-width:100% !important;
    min-width:0 !important;
  }
  body.bt-mobile-root-fix :is(.bt-widget-section, .bt-subpage-widget) .bt-ai-pills .pill {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:44px !important;
    height:auto !important;
    max-height:none !important;
    padding:9px 8px !important;
    white-space:normal !important;
    font-size:13px !important;
    line-height:1.3 !important;
    text-align:center !important;
  }

  /* Small, separate launch controls; only detected floating scroll-to-top
     actions are hidden. Normal page anchors/buttons are left intact. */
  body.bt-mobile-root-fix #bt-first-conversation-assistant {
    position:fixed !important;
    right:12px !important;
    left:auto !important;
    bottom:calc(12px + env(safe-area-inset-bottom,0px)) !important;
    z-index:47 !important;
    transform:none !important;
    margin:0 !important;
    width:auto !important;
  }
  body.bt-mobile-root-fix #bt-first-conversation-assistant .bt-first-conversation-launcher {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:0 !important;
    width:auto !important;
    max-width:164px !important;
    min-height:44px !important;
    height:44px !important;
    padding:9px 13px !important;
    gap:8px !important;
    font-size:14px !important;
    line-height:1.2 !important;
    background:#0a1318 !important;
    background-image:none !important;
    color:#fff !important;
    -webkit-text-fill-color:#fff !important;
    border:1px solid #25434a !important;
    border-radius:999px !important;
    box-shadow:0 6px 18px rgba(4,18,22,.18) !important;
    white-space:nowrap !important;
  }
  body.bt-mobile-root-fix #bt-first-conversation-assistant .bt-first-conversation-dialog {
    position:fixed !important;
    right:12px !important;
    bottom:calc(68px + env(safe-area-inset-bottom,0px)) !important;
    width:min(410px,calc(100vw - 24px)) !important;
    max-height:calc(100dvh - 96px) !important;
  }
  body.bt-mobile-root-fix [data-btmr-scrollup] {display:none !important;}
  body.bt-mobile-root-fix [data-btmr-whatsapp] {
    left:12px !important;
    right:auto !important;
    bottom:calc(12px + env(safe-area-inset-bottom,0px)) !important;
    margin:0 !important;
    transform:none !important;
    z-index:46 !important;
    --joinchat-btn-size:48px;
    --s:48px;
  }
  body.bt-mobile-root-fix [data-btmr-whatsapp] .joinchat__button,
  body.bt-mobile-root-fix [data-btmr-whatsapp] > :is(button,a),
  body.bt-mobile-root-fix [data-btmr-whatsapp].ht-ctc-chat .ht_ctc_style {
    width:48px !important;
    height:48px !important;
    min-width:48px !important;
    min-height:48px !important;
    max-width:48px !important;
    max-height:48px !important;
    box-sizing:border-box !important;
  }
  body.bt-mobile-root-fix[data-btmr-editing] #bt-first-conversation-assistant,
  body.bt-mobile-root-fix[data-btmr-editing] [data-btmr-whatsapp],
  body.bt-mobile-root-fix[data-btmr-dialog-open] [data-btmr-whatsapp] {
    visibility:hidden !important;
    pointer-events:none !important;
  }
}
