/* CRTT Rio v2.3.21 — mobile viewport and map-step layout corrections. */

/* The general message composer duplicates the dedicated Google Maps field.
   Hide it only while the newest booking response contains the location picker. */
#crtt-neo-chatbot-root .chatbot-container.crtt-map-step-active .chatbot-input-area {
  display: none !important;
}

#crtt-neo-chatbot-root .chatbot-container.crtt-map-step-active .chatbot-messages {
  min-height: 0 !important;
  flex: 1 1 auto !important;
}

#crtt-neo-chatbot-root .crtt-location-picker,
#crtt-neo-chatbot-root .crtt-location-input-row,
#crtt-neo-chatbot-root .crtt-location-results {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

#crtt-neo-chatbot-root .crtt-location-input-row {
  gap: 6px !important;
}

#crtt-neo-chatbot-root .crtt-location-input-row input.crtt-fast-location {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

#crtt-neo-chatbot-root .crtt-location-powered {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

@media (max-width: 767px) {
  /* Keep the fixed widget fully inside the available mobile viewport. */
  #crtt-neo-chatbot-root .chatbot-container,
  #crtt-neo-chatbot-root .chatbot-container.is-large {
    left: max(8px, env(safe-area-inset-left)) !important;
    right: auto !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    gap: 8px !important;
  }

  #crtt-neo-chatbot-root .chatbot-container .chatbot-window,
  #crtt-neo-chatbot-root .chatbot-container .chatbot-window.large {
    width: min(405px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
    height: min(690px, calc(100dvh - 92px)) !important;
    max-height: calc(100dvh - 92px) !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  #crtt-neo-chatbot-root .chatbot-container.is-large .chatbot-window.large {
    width: min(560px, calc(100vw - 16px)) !important;
    height: min(780px, calc(100dvh - 92px)) !important;
    max-height: calc(100dvh - 92px) !important;
  }

  #crtt-neo-chatbot-root .chatbot-container .chatbot-header {
    flex: 0 0 auto !important;
    min-width: 0 !important;
  }

  #crtt-neo-chatbot-root .chatbot-container .chatbot-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #crtt-neo-chatbot-root .chatbot-container .chatbot-input-area {
    flex: 0 0 auto !important;
    min-width: 0 !important;
  }

  #crtt-neo-chatbot-root .chatbot-container .html-content,
  #crtt-neo-chatbot-root .chatbot-container .crtt-fast-card,
  #crtt-neo-chatbot-root .chatbot-container .crtt-fast-choices {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #crtt-neo-chatbot-root .chatbot-container .crtt-fast-nav {
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 380px) {
  #crtt-neo-chatbot-root .crtt-location-powered {
    font-size: 9px !important;
  }

  #crtt-neo-chatbot-root .crtt-location-input-row {
    padding-left: 7px !important;
    padding-right: 7px !important;
  }
}
