/* CODSHIPX_AI_R72_C5_R19_R5_INBOX_FINAL_LAYOUT
 * Scoped corrective only: Inbox wrapping/header/action layout.
 */

.inbox-shell.r83-live-inbox,
.inbox-shell.r83-live-inbox .chat-pane,
.inbox-shell.r83-live-inbox .message-canvas {
  min-width: 0 !important;
  max-width: 100% !important;
}

.inbox-shell.r83-live-inbox .chat-pane,
.inbox-shell.r83-live-inbox .message-canvas {
  overflow-x: hidden !important;
}

.inbox-shell.r83-live-inbox .message {
  min-width: 0 !important;
  max-width: min(78%, 760px) !important;
  box-sizing: border-box !important;
}

.inbox-shell.r83-live-inbox .message > p {
  min-width: 0 !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.inbox-shell.r83-live-inbox .chat-head {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 10px !important;
}

.inbox-shell.r83-live-inbox .chat-head > .avatar-ring.large {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  flex: 0 0 42px !important;
}

.inbox-shell.r83-live-inbox .chat-head > div:not(.chat-head-actions) {
  min-width: 0 !important;
  overflow: hidden !important;
}

.inbox-shell.r83-live-inbox .chat-head > div:not(.chat-head-actions) > strong,
.inbox-shell.r83-live-inbox .chat-head > div:not(.chat-head-actions) > small {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.inbox-shell.r83-live-inbox .chat-head-actions {
  min-width: 0 !important;
  max-width: min(58vw, 720px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

.inbox-shell.r83-live-inbox .chat-head-actions > button,
.inbox-shell.r83-live-inbox .chat-head-actions > select {
  flex: 0 0 auto !important;
}

/* Temporary render races must never show two Full view buttons. */
.inbox-shell.r83-live-inbox
  .chat-head-actions
  [data-cx-r72-fullview]
  ~ [data-cx-r72-fullview] {
  display: none !important;
}

@media (max-width: 1100px) {
  .inbox-shell.r83-live-inbox .chat-head {
    grid-template-columns: auto auto minmax(0, 1fr) !important;
  }

  .inbox-shell.r83-live-inbox .chat-head-actions {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 760px) {
  .inbox-shell.r83-live-inbox .message {
    max-width: 88% !important;
  }

  .inbox-shell.r83-live-inbox .chat-head {
    column-gap: 8px !important;
  }
}

/* CODSHIPX_AI_R72_C5_R20_R1_FILTER_AND_HEADER_UI */
.inbox-shell.r83-live-inbox .cx-r64-date-filter {
  flex-wrap: nowrap !important;
  column-gap: 5px !important;
  row-gap: 0 !important;
  padding: 7px 8px 5px !important;
  overflow: hidden !important;
}

.inbox-shell.r83-live-inbox .cx-r64-date-filter .button {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 7px !important;
  font-size: 11px !important;
  flex: 0 0 auto !important;
}

.inbox-shell.r83-live-inbox
  .cx-r64-date-filter
  input[type="date"] {
  width: 108px !important;
  min-width: 108px !important;
  height: 32px !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  flex: 0 0 108px !important;
}

.inbox-shell.r83-live-inbox .inbox-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 8px 8px !important;
}

.inbox-shell.r83-live-inbox .inbox-tabs > button {
  min-width: 0 !important;
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
}

@media (min-width: 761px) {
  .inbox-shell.r83-live-inbox .chat-head {
    grid-template-columns:
      auto auto minmax(120px, 1fr) auto !important;
    column-gap: 8px !important;
  }

  .inbox-shell.r83-live-inbox .chat-head-actions {
    grid-column: auto !important;
    width: auto !important;
    max-width: none !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > button {
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 11px !important;
    white-space: nowrap !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > select {
    min-width: 108px !important;
    width: 108px !important;
    height: 36px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 760px) {
  .inbox-shell.r83-live-inbox .cx-r64-date-filter {
    overflow-x: auto !important;
    scrollbar-width: thin;
  }

  .inbox-shell.r83-live-inbox .chat-head-actions {
    flex-wrap: wrap !important;
  }
}

/* CODSHIPX_AI_R72_C5_R20_R2_COMPACT_HEADER_AND_BROADCAST */
.r83-live-inbox .cx34-broadcast-launch {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 9px !important;
  border-radius: 10px !important;
  gap: 5px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .15) !important;
}

.r83-live-inbox .cx34-broadcast-launch svg {
  width: 14px !important;
  height: 14px !important;
}

@media (min-width: 761px) {
  .inbox-shell.r83-live-inbox .chat-head {
    grid-template-columns:
      auto auto minmax(0, 1fr) auto !important;
    column-gap: 7px !important;
  }

  .inbox-shell.r83-live-inbox .chat-head-actions {
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > button {
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 8px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > select {
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    height: 34px !important;
    padding: 0 6px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
  }
}

/* CODSHIPX_AI_R72_C5_R20_R3_HEADER_FIT */
@media (min-width: 761px) {
  .inbox-shell.r83-live-inbox .chat-head {
    grid-template-columns:
      auto auto minmax(90px, 1fr) auto !important;
    column-gap: 6px !important;
  }

  .inbox-shell.r83-live-inbox .chat-head-actions {
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > .cx-r72-fullview-toggle {
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 6px !important;
    font-size: 10.5px !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > [data-cx-r72-c5-bot] {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 5px !important;
    font-size: 10.5px !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > [data-cx-r72-c5-order] {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 5px !important;
    font-size: 10.5px !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > select[aria-label="Conversation status"] {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    height: 32px !important;
    padding: 0 5px !important;
    font-size: 10.5px !important;
  }
}

/* CODSHIPX_AI_R72_C5_R20_R4_FULLVIEW_VERTICAL_ALIGNMENT */
@media (min-width: 761px) {
  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > .cx-r72-fullview-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 7px !important;
    line-height: 1 !important;
    overflow: visible !important;
    vertical-align: middle !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > .cx-r72-fullview-toggle
    .cx-r72-fullview-icon,
  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > .cx-r72-fullview-toggle
    .cx-r72-fullview-text {
    position: static !important;
    inset: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    translate: none !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > .cx-r72-fullview-toggle
    .cx-r72-fullview-icon {
    width: 14px !important;
    height: 14px !important;
    flex: 0 0 14px !important;
  }
}

/* CODSHIPX_AI_R72_C5_R20_R5_HEADER_FINAL_FIT */
@media (min-width: 761px) {
  .inbox-shell.r83-live-inbox .chat-head {
    grid-template-columns:
      auto auto minmax(160px, 1fr) auto !important;
    column-gap: 6px !important;
  }

  .inbox-shell.r83-live-inbox .chat-head-actions {
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > .cx-r72-fullview-toggle {
    width: 74px !important;
    min-width: 74px !important;
    max-width: 74px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 5px !important;
    gap: 4px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    overflow: visible !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > .cx-r72-fullview-toggle
    .cx-r72-fullview-icon {
    width: 12px !important;
    height: 12px !important;
    flex: 0 0 12px !important;
    font-size: 12px !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > .cx-r72-fullview-toggle
    .cx-r72-fullview-text {
    font-size: 10px !important;
    line-height: 1 !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > [data-cx-r72-c5-bot] {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > [data-cx-r72-c5-order] {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > select[aria-label="Conversation status"] {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    height: 32px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head
    > div:not(.chat-head-actions) {
    min-width: 160px !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head
    > div:not(.chat-head-actions)
    > strong {
    font-size: 13px !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head
    > div:not(.chat-head-actions)
    > small {
    font-size: 10.5px !important;
  }
}

/* CODSHIPX_AI_R72_C5_R20_R5_R3_TWO_LINE_HEADER_META */
.inbox-shell.r83-live-inbox
  .chat-head
  .cx-r72-chat-meta {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  line-height: 1.18 !important;
}

.inbox-shell.r83-live-inbox
  .chat-head
  .cx-r72-chat-meta
  > span {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* CODSHIPX_AI_R72_C5_R20_R6_R1_ACTION_CONTEXT_EXIT_FULLVIEW */
@media (min-width: 761px) {
  .inbox-shell.r83-live-inbox.cx-r72-inbox-fullview
    .chat-head-actions
    > .cx-r72-fullview-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 9px !important;
    gap: 5px !important;
    overflow: visible !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }

  .inbox-shell.r83-live-inbox.cx-r72-inbox-fullview
    .chat-head-actions
    > .cx-r72-fullview-toggle
    .cx-r72-fullview-icon,
  .inbox-shell.r83-live-inbox.cx-r72-inbox-fullview
    .chat-head-actions
    > .cx-r72-fullview-toggle
    .cx-r72-fullview-text {
    position: static !important;
    inset: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
    translate: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  .inbox-shell.r83-live-inbox.cx-r72-inbox-fullview
    .chat-head-actions
    > .cx-r72-fullview-toggle
    .cx-r72-fullview-icon {
    width: 13px !important;
    height: 13px !important;
    flex: 0 0 13px !important;
  }
}

/* CODSHIPX_AI_R72_C5_R20_R6_R2_PAUSED_BUTTON_FIT */
@media (min-width: 761px) {
  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > [data-cx-r72-c5-bot] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }

  .inbox-shell.r83-live-inbox
    .chat-head-actions
    > [data-cx-r72-c5-bot].cx-r72-c5-action-paused {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding: 0 4px !important;
    font-size: 9.5px !important;
  }
}
