/* ==========================================================================
   MINI CHAT INTELIGENTE 2.0 — DefesaExpress
   Tema Dark Luxury & Obsidian Gold — Ultra Premium com Alto Contraste
   ========================================================================== */

:root {
  --mc-bg-deep: #0b0d14;
  --mc-bg-card: #131622;
  --mc-surface: #1a1e2e;
  --mc-surface-hover: #23283c;
  --mc-border: rgba(212, 175, 55, 0.35);
  --mc-border-bright: #d4af37;
  --mc-gold: #d4af37;
  --mc-gold-light: #f7df8d;
  --mc-gold-dark: #a17c18;
  --mc-gold-glow: 0 0 25px rgba(212, 175, 55, 0.35);
  --mc-text-pure: #ffffff;
  --mc-text-sub: #cbd5e1;
  --mc-text-muted: #94a3b8;
  --mc-danger: #ef4444;
  --mc-success: #10b981;
  --mc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  --mc-radius: 20px;
}

#mc-widget, #mc-fab, .mc-root {
  font-family: var(--mc-font);
  box-sizing: border-box;
}

#mc-widget *, #mc-fab * {
  box-sizing: border-box;
}

/* ==========================================================================
   1. BOTÃO FLUTUANTE (FAB) COM PULSO DOURADO
   ========================================================================== */
#mc-fab {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 2147483000;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1.5px solid rgba(247, 223, 141, 0.5);
  cursor: pointer;
  background: linear-gradient(135deg, #f7df8d 0%, #d4af37 40%, #8f6c12 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.5);
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
}

#mc-fab:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9), 0 0 35px rgba(212, 175, 55, 0.7);
  border-color: #ffffff;
}

#mc-fab:active {
  transform: scale(0.95);
}

#mc-fab svg {
  width: 28px;
  height: 28px;
  color: #0b0d14;
  display: block;
  transition: transform 0.25s ease;
}

#mc-fab .mc-fab-open { display: flex; }
#mc-fab .mc-fab-close { display: none; }
#mc-fab.mc-opened .mc-fab-open { display: none; }
#mc-fab.mc-opened .mc-fab-close { display: flex; }
#mc-fab.mc-opened svg { transform: rotate(90deg); }

#mc-fab-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #d4af37;
  opacity: 0;
  animation: mcPulseRing 2.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

@keyframes mcPulseRing {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

#mc-fab .mc-fab-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--mc-danger);
  border: 2.5px solid #0b0d14;
  display: none;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.9);
}
#mc-fab .mc-fab-dot.mc-on { display: block; }

/* ==========================================================================
   2. JANELA PRINCIPAL DO CHAT
   ========================================================================== */
#mc-widget {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 2147483001;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 650px;
  max-height: calc(100vh - 110px);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--mc-radius);
  background: linear-gradient(170deg, #131622 0%, #0b0d14 100%);
  border: 1px solid var(--mc-border);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 40px rgba(212, 175, 55, 0.22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--mc-text-pure);
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.25, 1), height 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
}

#mc-widget.mc-open {
  display: flex;
  animation: mcSlideModalIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mcSlideModalIn {
  0% { opacity: 0; transform: translateY(28px) scale(0.93); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modo Maximizado / Expandido */
#mc-widget.mc-maximized {
  width: 860px !important;
  max-width: calc(100vw - 32px) !important;
  height: calc(100vh - 80px) !important;
  max-height: 850px !important;
  right: calc(50% - 430px) !important;
  bottom: calc(40px + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 900px) {
  #mc-widget.mc-maximized {
    right: 16px !important;
    left: 16px !important;
    width: auto !important;
  }
}

/* ==========================================================================
   3. CABEÇALHO COM EQUIPE, SOM E CONTROLES
   ========================================================================== */
.mc-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, #181c2b 0%, #10121c 100%);
  border-bottom: 1px solid var(--mc-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.mc-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mc-team-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mc-avatars-group {
  display: flex;
  align-items: center;
  position: relative;
}

.mc-avatar-circle {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background-color: #d4af37 !important;
  background: linear-gradient(135deg, #f7df8d 0%, #d4af37 100%) !important;
  background-image: linear-gradient(135deg, #f7df8d 0%, #d4af37 100%) !important;
  color: #0b0d14 !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #131622 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  position: relative !important;
  flex-shrink: 0 !important;
}

.mc-avatar-circle.mariana {
  background-color: #d4af37 !important;
  background: linear-gradient(135deg, #f7df8d 0%, #d4af37 100%) !important;
  background-image: linear-gradient(135deg, #f7df8d 0%, #d4af37 100%) !important;
  color: #0b0d14 !important;
}

.mc-avatar-circle.carlos {
  margin-left: -14px !important;
  background-color: #cbd5e1 !important;
  background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%) !important;
  background-image: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%) !important;
  color: #0b0d14 !important;
}

.mc-team-info {
  line-height: 1.25;
}

.mc-team-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-team-status {
  font-size: 11px;
  color: var(--mc-gold-light);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.mc-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mc-success);
  box-shadow: 0 0 8px var(--mc-success);
}

.mc-header-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mc-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.mc-icon-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  color: var(--mc-gold-light);
  border-color: var(--mc-border-bright);
  transform: translateY(-1px);
}

.mc-icon-btn.active {
  color: var(--mc-gold-light);
  border-color: var(--mc-border-bright);
}

.mc-icon-btn.mc-btn-clear:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.mc-icon-btn.mc-btn-close {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.mc-icon-btn.mc-btn-close:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.mc-icon-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.mc-sla-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  color: #e2e8f0;
}

.mc-sla-banner svg {
  width: 14px;
  height: 14px;
  color: var(--mc-gold);
  flex-shrink: 0;
}

/* ==========================================================================
   4. CORPO DO CHAT & MENSAGENS DARK LUXURY
   ========================================================================== */
.mc-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.mc-msgs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 14px 10px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.35) transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mc-msgs::-webkit-scrollbar {
  width: 5px;
}

.mc-msgs::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.35);
  border-radius: 6px;
}

.mc-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: mcMsgIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes mcMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mc-msg.mc-user {
  align-self: flex-end;
  align-items: flex-end;
}

.mc-msg.mc-bot {
  align-self: flex-start;
  align-items: flex-start;
}

.mc-msg.mc-has-chips {
  max-width: 96%;
  width: 96%;
}

.mc-msg.mc-has-chips .mc-bubble {
  width: 100%;
}

.mc-msg-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--mc-text-muted);
  margin-bottom: 4px;
  padding: 0 4px;
}

.mc-msg.mc-user .mc-msg-head {
  flex-direction: row-reverse;
}

.mc-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.54;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.mc-user .mc-bubble {
  background: linear-gradient(135deg, #d4af37 0%, #aa841c 100%);
  color: #000000;
  border-bottom-right-radius: 4px;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.28);
}

.mc-bot .mc-bubble {
  background: #181c2b;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-bottom-left-radius: 4px;
  color: #f8fafc;
}

.mc-bot .mc-bubble strong {
  color: #f7df8d !important;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(247, 223, 141, 0.25);
}

.mc-user .mc-bubble strong {
  color: #000000;
  font-weight: 800;
}

.mc-msg-assistant .mc-bubble a,
.mc-msg-assistant .mc-bubble .mc-link,
.mc-bot .mc-bubble a,
.mc-bot .mc-bubble .mc-link,
.mc-bubble .mc-link,
.mc-link {
  color: #0b0d14 !important;
  background: linear-gradient(135deg, #f7df8d 0%, #d4af37 100%) !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 4px 2px !important;
  box-shadow: 0 3px 12px rgba(212, 175, 55, 0.45) !important;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.25, 1) !important;
  font-size: 13px !important;
  vertical-align: middle;
}

.mc-msg-assistant .mc-bubble a:hover,
.mc-msg-assistant .mc-bubble .mc-link:hover,
.mc-bot .mc-bubble a:hover,
.mc-bot .mc-bubble .mc-link:hover,
.mc-bubble .mc-link:hover,
.mc-link:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.7) !important;
  filter: brightness(1.1) !important;
}

.mc-user .mc-bubble a {
  color: #000000;
  text-decoration: underline;
  font-weight: 700;
}

.mc-msg-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 0 4px;
}

.mc-time {
  font-size: 10px;
  color: var(--mc-text-muted);
}

.mc-check-double {
  display: inline-flex;
  align-items: center;
  color: #d4af37;
}

.mc-check-double svg {
  width: 14px;
  height: 14px;
}

.mc-copy-btn {
  background: none;
  border: none;
  color: var(--mc-text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  transition: all 0.15s ease;
  opacity: 0.7;
}

.mc-copy-btn:hover {
  opacity: 1;
  color: var(--mc-gold-light);
  background: rgba(212, 175, 55, 0.15);
}

.mc-copy-btn svg {
  width: 12px;
  height: 12px;
}

/* ==========================================================================
   5. MINI CARDS DOURADOS DE CONVERSÃO DE SERVIÇOS
   ========================================================================== */
.mc-service-card {
  margin-top: 10px;
  background: linear-gradient(145deg, #1e2235, #141724);
  border: 1.5px solid #d4af37;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mc-service-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mc-service-title {
  font-size: 13px;
  font-weight: 800;
  color: #f7df8d;
}

.mc-service-badge {
  background: #22c55e;
  color: #0b0d14;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

.mc-service-desc {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.4;
}

.mc-service-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.mc-service-price-row strong {
  font-size: 15px;
  color: #ffffff;
}

.mc-service-btn {
  background: linear-gradient(135deg, #f7df8d 0%, #d4af37 100%);
  color: #0b0d14;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
  transition: all 0.2s ease;
}

.mc-service-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.55);
}

.mc-service-btn svg {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   6. AVALIAÇÃO CSAT (⭐️⭐️⭐️⭐️⭐️)
   ========================================================================== */
.mc-csat-card {
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
}

.mc-csat-title {
  font-size: 11.5px;
  color: var(--mc-gold-light);
  margin-bottom: 6px;
  font-weight: 600;
}

.mc-csat-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.mc-star-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  transition: all 0.15s ease;
}

.mc-star-btn:hover, .mc-star-btn.active {
  color: #f59e0b;
  transform: scale(1.2);
}

/* ==========================================================================
   7. MENU DE OPÇÕES EM BOTÕES PADRONIZADOS (TEMA ONYX + DOURADO)
   ========================================================================== */
.mc-chips {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
  width: 100%;
}

.mc-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  justify-content: flex-start;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.08);
  color: #f8fafc;
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.25, 1);
  font-family: var(--mc-font);
  user-select: none;
  font-weight: 500;
}

.mc-chip:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--mc-gold);
  color: #f7df8d;
  transform: translateX(3px);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.mc-chip-num {
  background: linear-gradient(135deg, #f7df8d 0%, #d4af37 100%);
  color: #0b0d14;
  font-weight: 800;
  font-size: 10.5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}

.mc-chip-text {
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
  text-align: left;
  flex: 1;
  line-height: 1.35;
  word-break: break-word;
}

/* ==========================================================================
   8. PLAYER DE VOZ WHATSAPP / TELEGRAM
   ========================================================================== */
.mc-wa-player {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 7px 12px;
  border-radius: 16px;
  margin-top: 8px;
  max-width: 300px;
  width: 100%;
  box-sizing: border-box;
  user-select: none;
}

.mc-user .mc-wa-player {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(0, 0, 0, 0.2);
}

.mc-wa-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2000, #14141b);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.mc-wa-mic {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 13px;
  height: 13px;
  background: #d4af37;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #0b141a;
  color: #0b141a;
}

.mc-wa-play {
  background: transparent;
  border: none;
  color: var(--mc-gold-light);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.mc-user .mc-wa-play {
  color: #000000;
}

.mc-wa-play:hover {
  transform: scale(1.15);
}

.mc-wa-track {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mc-wa-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  cursor: pointer;
  position: relative;
  width: 100%;
}

.mc-wa-bar {
  width: 2.5px;
  background: rgba(212, 175, 55, 0.35);
  border-radius: 2px;
  transition: background 0.08s linear;
}

.mc-user .mc-wa-bar {
  background: rgba(0, 0, 0, 0.25);
}

.mc-wa-bar.played {
  background: #f7df8d;
}

.mc-user .mc-wa-bar.played {
  background: #000000;
}

.mc-wa-scrub {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f7df8d;
  box-shadow: 0 0 8px rgba(247, 223, 141, 0.9);
  pointer-events: none;
  transition: left 0.08s linear;
}

.mc-wa-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--mc-gold-light);
  font-family: monospace;
  font-weight: 700;
}

.mc-user .mc-wa-time-row {
  color: rgba(0, 0, 0, 0.85);
}

.mc-wa-speed {
  background: rgba(212, 175, 55, 0.2);
  border: none;
  color: var(--mc-gold-light);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
}

.mc-user .mc-wa-speed {
  background: rgba(0, 0, 0, 0.15);
  color: #000000;
}

/* ==========================================================================
   9. GRAVAÇÃO DE ÁUDIO COM ONDAS AO VIVO (LIVE WAVE)
   ========================================================================== */
.mc-rec-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 12px;
  padding: 5px 10px;
  animation: mcRecFade 0.25s ease;
}

@keyframes mcRecFade {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.mc-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: mcRecBlink 1s infinite alternate;
}

@keyframes mcRecBlink {
  from { opacity: 0.4; }
  to { opacity: 1; transform: scale(1.15); }
}

.mc-rec-timer {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: #ef4444;
  min-width: 36px;
}

.mc-rec-wave-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  overflow: hidden;
}

.mc-rec-wave-bar {
  width: 3px;
  height: 6px;
  background: #ef4444;
  border-radius: 2px;
  transition: height 0.08s ease;
}

.mc-rec-btn-cancel {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ef4444 !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.mc-rec-btn-send {
  background: #22c55e !important;
  color: #0a0a0f !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.4);
}

/* ==========================================================================
   10. RODAPÉ DE DIGITAÇÃO & BOTÕES
   ========================================================================== */
.mc-footer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--mc-border);
  background: rgba(16, 18, 28, 0.98);
}

.mc-footer button {
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.mc-footer button svg {
  width: 19px;
  height: 19px;
  display: block;
}

#mc-input {
  flex: 1;
  min-width: 0;
  background: #1a1e2e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--mc-font);
}

#mc-input::placeholder {
  color: #94a3b8;
}

#mc-input:focus {
  border-color: var(--mc-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}

#mc-mic {
  background: rgba(255, 255, 255, 0.06);
  color: var(--mc-gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

#mc-mic:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--mc-gold);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
}

#mc-send {
  background: linear-gradient(135deg, #f7df8d, #d4af37);
  color: #0b0d14;
}

#mc-send:hover {
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.5);
  transform: translateY(-1px);
}

#mc-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   11. INDICADOR "DIGITANDO..." HUMANIZADO COM AVATAR
   ========================================================================== */
.mc-typing-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #181c2b;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  font-size: 12px;
  color: var(--mc-gold-light);
}

.mc-typing-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7df8d, #d4af37);
  color: #0b0d14;
  font-weight: 800;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mcPulseRing 1.8s infinite;
}

.mc-typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mc-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mc-gold);
  animation: mcDotWave 1.2s infinite ease-in-out;
}

.mc-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.mc-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes mcDotWave {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}

/* ==========================================================================
   12. RESPONSIVIDADE MOBILE
   ========================================================================== */
@media (max-width: 640px) {
  #mc-fab {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    width: 56px;
    height: 56px;
  }

  /* Elevação extra em telas estreitas para não obstruir botões de pagamento */
  body.checkout-page #mc-fab,
  body.pagina-checkout #mc-fab,
  .checkout-container #mc-fab {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  #mc-widget {
    right: 10px;
    left: 10px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: none;
    height: calc(100vh - 80px);
    max-height: 580px;
    border-radius: 18px;
  }

  .mc-msg {
    max-width: 92%;
  }

  /* Cabeçalho do mini-chat: blindagem contra estouro em telas estreitas.
     Em vez de forçar tudo numa linha só (o que fazia os botões "saírem"
     do card em aparelhos menores), o cabeçalho ganha respiro para quebrar
     em duas linhas quando não há espaço — nunca mais corta/estoura botão. */
  .mc-header-top {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .mc-team-badge {
    min-width: 0;
    flex: 1 1 auto;
  }
  .mc-team-info {
    min-width: 0;
  }
  .mc-team-title {
    overflow-wrap: anywhere;
  }
  .mc-header-controls {
    margin-left: auto;
    gap: 3px;
  }
  .mc-icon-btn {
    width: 28px;
    height: 28px;
  }
  .mc-icon-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* ==========================================================================
   13. MODAL DE CONFIRMAÇÃO (LIMPAR HISTÓRICO)
   ========================================================================== */
#mc-confirm-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(5, 7, 15, 0.78) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  box-sizing: border-box !important;
}

