/*
============================================================================
ASKCARBI MOBILE RESPONSIVE REPAIR
============================================================================
*/

html,
body {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video,
canvas,
svg,
iframe {
  max-width: 100%;
}

#root,
#carbi-premium-home,
#csc-specialist-chat {
  width: 100% !important;
  max-width: 100vw !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

#csc-specialist-chat {
  left: 0 !important;
  right: 0 !important;
  inset-inline: 0 !important;
}

#csc-specialist-chat .csc-shell,
#csc-specialist-chat .csc-content,
#csc-specialist-chat .csc-messages,
#csc-specialist-chat .csc-composer,
#csc-specialist-chat .csc-header {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

#csc-specialist-chat .csc-message,
#csc-specialist-chat .csc-message-content,
#csc-specialist-chat .csc-message-bubble {
  min-width: 0 !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#csc-input {
  min-width: 0 !important;
  max-width: 100% !important;
}

#csc-microphone,
#csc-stop-conversation,
.csc-suggestion,
.cres-room-search-button {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color:
    transparent;
}

/*
 * Remove the failed one-tap overlay even if an old
 * cached JavaScript copy recreates it temporarily.
 */
#carbi-real-estate-start-screen,
.cres-start-screen {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.carbi-real-estate-start-open {
  overflow: auto !important;
  overflow-x: hidden !important;
}

/*
 * Keep the actual property-search panel responsive.
 */
#carbi-real-estate-search-panel {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

#carbi-real-estate-search-panel .cres-shell {
  width:
    min(620px, calc(100vw - 16px))
    !important;
  max-width:
    calc(100vw - 16px)
    !important;
  min-width: 0 !important;
}

@media (max-width: 620px) {
  #csc-specialist-chat {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  #csc-specialist-chat .csc-shell {
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
  }

  #csc-specialist-chat .csc-content,
  #csc-specialist-chat .csc-messages {
    overflow-x: hidden !important;
  }

  #carbi-real-estate-search-panel {
    padding:
      env(safe-area-inset-top)
      0
      env(safe-area-inset-bottom)
      !important;
  }
}
