/* Keep legal navigation on public/auth pages without covering workspace actions. */
.app-shell:not([hidden]) ~ .app-legal-links {
  display: none !important;
}

/* Audio recording and transcription state belongs inside the composer. */
.voice-draft,
.quick-reply-voice {
  position: relative;
  z-index: 2;
}

/* Compact Codex-style voice recorder: one calm row, neutral waveform. */
.composer-pro .voice-draft {
  grid-row: 2 !important;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 46px !important;
  grid-template-columns: auto 28px minmax(90px, 1fr) auto minmax(0, auto) 28px !important;
  gap: 7px !important;
  padding: 6px 8px !important;
  border: 1px solid #d7dbe2 !important;
  border-radius: 23px !important;
  background: #f1f2f4 !important;
  box-shadow: none !important;
}
.composer-pro:has(.voice-draft:not([hidden])) > textarea { display: none !important; }
.composer-pro > .primary { position: relative; z-index: 9; }
.composer-pro .voice-draft:not(.recording-live) {
  grid-template-columns: 28px minmax(0, 1fr) auto auto 28px !important;
}
.composer-pro .voice-draft:not(.recording-live) .voice-draft-title { display: none; }
.composer-pro .voice-draft:not(.recording-live) .voice-transcript-actions { grid-column: auto !important; }
.composer-pro .voice-draft.transcribing .voice-draft-title {
  display: flex;
  grid-column: 1 / -1;
  white-space: normal;
}
.composer-pro .voice-draft.transcribing .voice-transcript-actions { visibility: hidden; }
.composer-pro .voice-draft canvas {
  height: 22px !important;
  border-radius: 11px !important;
  background: transparent !important;
}
.composer-pro .voice-draft .voice-play,
.composer-pro .voice-draft .voice-discard,
.composer-pro .voice-draft .voice-cancel-recording {
  width: 28px;
  height: 28px;
  padding: 0 !important;
  border-radius: 50% !important;
}
.composer-pro .voice-draft .voice-cancel-recording {
  display: none;
  border: 0;
  background: #e2e4e8;
  color: #535a64;
  font-size: 18px;
  cursor: pointer;
}
.composer-pro .voice-draft.recording-live {
  width: 50% !important;
  min-width: 320px;
  max-width: 520px;
  min-height: 40px !important;
  height: 40px;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: 28px minmax(100px, 1fr) auto !important;
  justify-self: start;
  padding: 5px 76px 5px 7px !important;
  border-radius: 12px !important;
}
.composer-pro .voice-draft.recording-live .voice-cancel-recording { position: relative; display: grid; place-items: center; }
.composer-pro .voice-draft.recording-live .voice-cancel-recording::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e23434;
  box-shadow: 0 0 0 2px rgba(226,52,52,.12);
  animation: recordingBlink 1s ease-in-out infinite;
}
.composer-pro .voice-draft.recording-live .voice-draft-title { display: none; }
.composer-pro .voice-draft.recording-live .voice-discard {
  display: inline-flex;
  position: absolute;
  top: 6px;
  right: 7px;
  width: auto;
  height: 28px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px !important;
  border: 1px solid #c9cdd4 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #303640 !important;
  font-size: 10px !important;
  font-weight: 800;
  white-space: nowrap;
}
.composer-pro:has(.voice-draft.recording-live) textarea,
.composer-pro:has(.voice-draft.recording-live) .composer-shortcuts,
.composer-pro:has(.voice-draft.recording-live) .ready-reply-dock { display: none !important; }
@keyframes recordingBlink { 0%, 100% { opacity: 1; } 50% { opacity: .18; } }
.new-conversation-picker { display: grid; gap: 12px; }
.new-conversation-picker label { display: grid; gap: 6px; color: #454955; font-size: 10px; font-weight: 800; }
.new-conversation-picker input,
.new-conversation-picker select { box-sizing: border-box; width: 100%; margin: 0 !important; border: 1px solid #d9dce3 !important; border-radius: 9px !important; background: #fff; font-size: 11px !important; }
.new-conversation-picker select { min-height: 210px; padding: 5px !important; }
.new-conversation-picker option { padding: 8px; border-radius: 6px; }
.new-conversation-picker small { color: #7a808b; font-size: 9px; }
/* Neutral CRM typography matching the supplied conversation-list reference. */
.manychat-inbox,
.manychat-inbox button,
.manychat-inbox input,
.manychat-inbox select,
.manychat-inbox textarea {
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
.manychat-inbox .inbox-folders button,
.manychat-inbox .inbox-labels button {
  color: #343434;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}
.manychat-inbox .inbox-label-head {
  color: #777;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.manychat-inbox .conversation-name-line strong {
  color: #707070;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}
.manychat-inbox .conversation-name-line time {
  color: #777;
  font-size: 10.5px;
  font-weight: 400;
}
.manychat-inbox .conversation-item > span:nth-child(2) > small {
  display: block;
  overflow: hidden;
  color: #777;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manychat-inbox .conversation-badges b {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0;
}
.composer-shortcuts .basic-action-icon,
.composer-shortcuts .basic-microphone-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.composer-shortcuts .composer-ai-write,
.composer-shortcuts #composer-emoji,
.composer-shortcuts #composer-attach,
.composer-shortcuts .audio-record-button,
.composer-shortcuts .audio-ai-dictation-button {
  color: #58636e !important;
  font-size: 0 !important;
}
.composer-shortcuts .audio-ai-dictation-button { position: relative; }
.composer-shortcuts .audio-ai-dictation-button.recording {
  border-radius: 7px;
  background: #e9e3fb !important;
  color: #6540bd !important;
}
@media (min-width: 1251px) {
  .manychat-inbox {
    grid-template-columns: 190px 318px minmax(400px, 1fr) 252px !important;
  }
  .manychat-inbox.details-collapsed {
    grid-template-columns: 190px 318px minmax(400px, 1fr) !important;
  }
  .manychat-inbox.details-collapsed .conversation-details { display: none !important; }
}
.manychat-inbox .chat-contact-identity > strong {
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: 0;
}
.manychat-inbox .chat-contact-identity > p,
.manychat-inbox .chat-channel-bar {
  font-size: 11.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0;
}
.manychat-inbox .messages .message {
  font-size: 13px !important;
  font-weight: 400 !important;
  letter-spacing: 0;
}
.manychat-inbox .composer-mode > button,
.manychat-inbox .composer-pro textarea {
  font-weight: 400 !important;
  letter-spacing: 0;
}
.manychat-inbox .chat-actions #toggle-contact-details { color: #0877e8; }
.manychat-inbox .chat-actions #toggle-contact-details.is-active { background: #eaf4ff; }
.manychat-inbox .chat-actions .details-panel-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 1250px) {
  .manychat-inbox .chat-actions #toggle-contact-details { display: none !important; }
}
.composer-pro .voice-draft.recording-live .voice-status-dot { display: none; }
.composer-pro .voice-draft .voice-transcript-actions { display: flex; min-width: 0; flex-wrap: nowrap; justify-content: flex-end; gap: 5px; }
.composer-pro .voice-draft .voice-transcript-actions button { padding: 5px 7px; font-size: 9px; white-space: nowrap; }
.composer-pro .voice-draft:not(.recording-live) .voice-discard { color: #a22b25; font-size: 18px; font-weight: 700; }
.composer-pro .composer-mode{flex-wrap:nowrap!important;gap:5px!important}
.composer-pro .composer-mode .voice-polish-actions{display:inline-flex;flex:0 0 auto;margin:0}
.composer-pro .composer-mode .voice-polish-actions[hidden]{display:none!important}
.composer-pro .composer-mode .voice-polish-actions button{padding:3px 6px;border:1px solid #d7cffa;border-radius:7px;background:#eeeaff;color:#5b35ba;font-size:8px;font-weight:800;white-space:nowrap;cursor:pointer}
.composer-pro .composer-mode>button{min-width:0;padding-inline:3px!important;font-size:8.5px!important;white-space:nowrap}
.composer-pro .composer-mode .composer-improve-text,.composer-pro .composer-mode .composer-summary{padding:3px 5px!important}
.global-ai-usage{display:flex;min-width:172px;align-items:center;gap:8px;padding:5px 9px;border:1px solid #cfe3d7;border-radius:10px;background:#f2faf5;color:#245b3d;text-decoration:none;line-height:1.1}
.global-ai-usage[hidden]{display:none!important}.global-ai-usage>span:first-child{display:grid;width:25px;height:25px;flex:0 0 25px;border-radius:8px;background:#dff3e7;place-items:center;font-size:9px;font-weight:900}.global-ai-usage>span:last-child{display:grid;min-width:0;gap:2px}.global-ai-usage b{font-size:10px;white-space:nowrap}.global-ai-usage small{color:#648071;font-size:7.5px;white-space:nowrap}.global-ai-usage.attention{border-color:#e5cb6d;background:#fff9dd;color:#725b08}.global-ai-usage.warning{border-color:#e7a64d;background:#fff2dc;color:#874e06}.global-ai-usage.critical{border-color:#e17b82;background:#fff0f1;color:#a2232d}
@media(max-width:760px){.global-ai-usage{min-width:0;padding:5px}.global-ai-usage>span:last-child small{display:none}.global-ai-usage b{font-size:8px}}
@media (max-width: 900px) {
  .composer-pro .voice-draft { border-radius: 16px !important; }
  .composer-pro .voice-draft:not(.recording-live) { grid-template-columns: 28px minmax(80px,1fr) auto minmax(0,auto) 28px !important; }
  .composer-pro .voice-draft:not(.recording-live) .voice-draft-title { display: none; }
  .composer-pro .voice-draft .voice-transcript-actions button { padding-inline: 6px; font-size: 8.5px; }
}
@media (max-width: 640px) {
  .composer-pro .voice-draft.recording-live { width: 100% !important; min-width: 0; }
  .composer-pro .voice-draft:not(.recording-live) { grid-template-columns: 28px minmax(0,1fr) auto auto 28px !important; }
  .composer-pro .voice-draft:not(.recording-live) .voice-transcript-actions { grid-column: 1 / -1; justify-content: center; }
}
