.xd-chat-pedido-modal[hidden] { display: none !important; }
.xd-chat-pedido-modal { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 18px; font-family: inherit; }
.xd-chat-pedido-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .62); backdrop-filter: blur(3px); }
.xd-chat-pedido-dialog { position: relative; display: flex; flex-direction: column; width: min(100%, 480px); max-height: min(680px, 90vh); overflow: hidden; border: 1px solid #e5e7eb; border-radius: 20px; background: #fff; box-shadow: 0 24px 80px rgba(15, 23, 42, .25); color: #172033; }
.xd-chat-pedido-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #edf0f3; }
.xd-chat-pedido-head span { color: #1d4ed8; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.xd-chat-pedido-head h2 { margin: 3px 0 0; font-size: 18px; }
.xd-chat-pedido-head small { display: block; margin-top: 4px; color: #64748b; font-size: 11px; }
.xd-chat-pedido-head button { display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 12px; background: #f1f5f9; color: #334155; cursor: pointer; }
.xd-chat-pedido-canais { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid #edf0f3; background: #fff; }
.xd-chat-pedido-canais span,
.xd-chat-pedido-canais button { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font: inherit; font-size: 11px; font-weight: 800; }
.xd-chat-pedido-canais button { border-color: #c7d2fe; background: #eef2ff; color: #3730a3; cursor: pointer; }
.xd-chat-pedido-canais button[hidden] { display: none !important; }
.xd-chat-pedido-lista { display: flex; flex: 1; min-height: 220px; flex-direction: column; gap: 10px; overflow-y: auto; padding: 18px; background: #f8fafc; }
.xd-chat-pedido-msg { max-width: 84%; align-self: flex-start; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 14px 14px 14px 4px; background: #fff; overflow-wrap: anywhere; }
.xd-chat-pedido-msg.is-loja { align-self: flex-end; border-color: #bfdbfe; border-radius: 14px 14px 4px 14px; background: #eff6ff; }
.xd-chat-pedido-msg p { margin: 0; white-space: pre-wrap; font-size: 14px; line-height: 1.45; }
.xd-chat-pedido-msg time { display: block; margin-top: 5px; color: #64748b; font-size: 10px; text-align: right; }
.xd-chat-pedido-vazio { margin: auto; color: #64748b; font-size: 13px; text-align: center; }
.xd-chat-pedido-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid #edf0f3; }
.xd-chat-pedido-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 11px 12px; border: 1px solid #dbe2ea; border-radius: 12px; font: inherit; }
.xd-chat-pedido-form button { width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 12px; background: #111827; color: #fff; cursor: pointer; }
.xd-chat-pedido-form button:disabled { opacity: .55; cursor: wait; }
.xd-chat-pedido-feedback { min-height: 18px; margin: 0; padding: 0 14px 8px; color: #b91c1c; font-size: 12px; }
.caixa-pedido-btn--chat { border-color: #bfdbfe !important; color: #1d4ed8 !important; }
.xd-chat-pedido-unread,
.xd-chat-motoboy-unread { display: inline-flex; min-width: 18px; height: 18px; align-items: center; justify-content: center; margin-left: 5px; padding: 0 5px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 800; line-height: 18px; }
button[data-chat-pedido-id]:not(.xd-v2-chip),
button[data-chat-pedido-venda-id] { position: relative; }
button[data-chat-pedido-id]:not(.xd-v2-chip) .xd-chat-pedido-unread,
button[data-chat-pedido-venda-id] .xd-chat-pedido-unread { position: absolute; top: -9px; right: -8px; z-index: 4; margin: 0; box-shadow: 0 2px 6px rgba(127, 29, 29, .3); }
.xd-gifood-card[data-chat-entrega-chip-id],
#xdLojaUiV2Board .xd-v2-chip[data-chat-entrega-chip-id] { position: relative; overflow: visible; }
button[data-chat-motoboy-pedido-id] { position: relative; }
.xd-gifood-card[data-chat-entrega-chip-id] > .xd-chat-motoboy-unread,
#xdLojaUiV2Board .xd-v2-chip[data-chat-entrega-chip-id] > .xd-chat-motoboy-unread,
button[data-chat-motoboy-pedido-id] > .xd-chat-motoboy-unread { position: absolute; top: 4px; right: 4px; z-index: 5; margin: 0; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(127, 29, 29, .3); pointer-events: none; }
.xd-gifood-card.has-chat-unread,
#xdLojaUiV2Board .xd-v2-chip.has-chat-unread,
.xd-gifood-card.has-motoboy-chat-unread,
#xdLojaUiV2Board .xd-v2-chip.has-motoboy-chat-unread { border-color: #ef4444 !important; box-shadow: 0 0 0 2px rgba(239, 68, 68, .14); animation: xd-chat-unread-outline 1s ease-in-out infinite; }
.xd-chat-motoboy-alert { display: grid; grid-template-areas: "alert"; width: 100%; min-width: 0; min-height: 16px; align-items: center; justify-items: center; margin-top: 3px; padding: 2px 4px; overflow: hidden; border-radius: 5px; background: #fef2f2; color: #b91c1c; font-size: 9px; font-weight: 900; line-height: 1.15; text-align: center; white-space: nowrap; animation: xd-chat-motoboy-alert-blink .8s steps(2, start) infinite; box-sizing: border-box; }
.xd-chat-motoboy-alert > span { grid-area: alert; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.xd-chat-motoboy-alert__attention { animation: xd-chat-motoboy-alert-attention 3.6s steps(1, end) infinite; }
.xd-chat-motoboy-alert__message { animation: xd-chat-motoboy-alert-message 3.6s steps(1, end) infinite; }
@keyframes xd-chat-motoboy-alert-blink { 50% { opacity: .35; } }
@keyframes xd-chat-motoboy-alert-attention { 0%, 46% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes xd-chat-motoboy-alert-message { 0%, 49% { opacity: 0; } 50%, 96% { opacity: 1; } 97%, 100% { opacity: 0; } }
.xd-gifood-card .xd-chat-pedido-unread { position: absolute; top: -7px; right: -7px; margin: 0; z-index: 3; box-shadow: 0 2px 6px rgba(127, 29, 29, .3); }
@keyframes xd-chat-unread-outline {
  0%, 100% { border-color: #ef4444; box-shadow: 0 0 0 2px rgba(239, 68, 68, .25); }
  50% { border-color: transparent; box-shadow: 0 0 0 2px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .xd-gifood-card.has-chat-unread,
  #xdLojaUiV2Board .xd-v2-chip.has-chat-unread,
  .xd-gifood-card.has-motoboy-chat-unread,
  #xdLojaUiV2Board .xd-v2-chip.has-motoboy-chat-unread { animation: none; }
  .xd-chat-motoboy-alert,
  .xd-chat-motoboy-alert__attention { animation: none; }
  .xd-chat-motoboy-alert__attention { display: none; }
  .xd-chat-motoboy-alert__message { display: block; opacity: 1; animation: none; }
}
.xd-chat-pedido-toast[hidden] { display: none !important; }
.xd-chat-pedido-toast { position: fixed; right: 20px; bottom: 20px; z-index: 10060; max-width: min(420px, calc(100vw - 32px)); padding: 14px 18px; border: 0; border-radius: 14px; background: #172033; box-shadow: 0 12px 32px rgba(15, 23, 42, .28); color: #fff; font: inherit; font-size: 13px; font-weight: 800; text-align: left; cursor: pointer; }
.xd-chat-pedido-toast:hover { background: #1e3a8a; }
.xd-chat-pedido-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.xd-chat-motoboy-modal { z-index: 10070; }
.xd-chat-motoboy-modal .xd-chat-pedido-head span { color: #059669; }
.xd-chat-motoboy-modal .xd-chat-pedido-canais span { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.xd-chat-motoboy-modal .xd-chat-pedido-msg.is-loja { border-color: #a7f3d0; background: #ecfdf5; }
.xd-chat-motoboy-msg-content { overflow-wrap: anywhere; }
.xd-chat-motoboy-msg-content img,
.xd-chat-motoboy-msg-content video { display: block; max-width: min(360px, 100%); height: auto; border-radius: 10px; }
.xd-chat-motoboy-msg-content audio { display: block; max-width: min(360px, 100%); }
.xd-chat-motoboy-modal .xd-chat-pedido-form[hidden] { display: none !important; }
.xd-chat-motoboy-modal .xd-chat-pedido-form button.xd-chat-motoboy-attach { border: 1px solid #dbe2ea; background: #f1f5f9; color: #334155; }
.xd-chat-motoboy-modal .xd-chat-pedido-form button.xd-chat-motoboy-attach:hover { background: #e2e8f0; }
