/*
whatsapp_chat.css - GESTORWEBZAP
Estilos da tela de chat (ContentEditable e Preview de Imagem).
*/

:root 
{
  --gwz-rodapé-bg: #ffffff;
  --gwz-rodapé-dark: #eaf2f6;
  --gwz-rodapé-sidebar: #f4f8fb;
  --gwz-rodapé-card: #ffffff;
  --gwz-rodapé-hover: #e1edf3;
  --gwz-rodapé-border: #c4dce8;
  --gwz-rodapé-border-focus: #3190BB;
  --gwz-rodapé-blue: #3190BB;
  --gwz-rodapé-blue-hover: #26789e;
  --gwz-rodapé-blue-light: #73B3D0;
  --gwz-rodapé-blue-bg: rgba(49, 144, 187, 0.12);
  --gwz-text-white: #1c3647;
  --gwz-text-muted: #406277;
  --gwz-text-sub: #2d4c60;
  --gwz-green: #28a745;
  --gwz-orange: #f59e0b;
  --gwz-cyan: #17a2b8;
  --gwz-danger: #ef4444;
}

.gwz-tool-btn 
{
    background: transparent;
    border: none;
    color: #aebac1;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.gwz-tool-btn:hover 
{
    background: #3b4a54;
    color: #ffffff;
}
/* ==========================================================
   1. LAYOUT BASE
   ========================================================== */
.gwz-app-wrapper 
{
  width: 100%;
  /* [INICIO CORRECAO 30-10-2026 | Finalidade: impedir que o wrapper ultrapasse a altura da janela e gere rolagem da pagina (offset medido na captura: barra do sistema ~90px + barra de status ~20px) | Gerado por IA] */
  --gwz-offset-topo: 120px;
  height: calc(100vh - var(--gwz-offset-topo));
  max-height: calc(100vh - var(--gwz-offset-topo));
  min-height: 0;
  /* [FIM CORRECAO] */
  box-sizing: border-box;
  padding: 6px 8px;
  background-color: var(--gwz-rodapé-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  overflow: hidden;
}
.gwz-app-wrapper * { box-sizing: border-box; }

.gwz-container 
{
  display: flex;
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  background-color: var(--gwz-rodapé-bg);
  color: var(--gwz-text-white);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--gwz-rodapé-border);
}

/* ==========================================================
   2. NOTIFICAÇÃO (TOAST) E ANIMAÇÕES
   ========================================================== */
.gwz-notification-toast 
{
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #000000;
  border: 1.5px solid var(--gwz-rodapé-blue-light);
  border-radius: 4px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(49, 144, 187, 0.25);
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 999999;
  animation: gwzFadeIn 0.2s ease-in-out;
}
@keyframes gwzFadeIn 
{
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.gwz-mic-active 
{
  background-color: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  animation: gwzPulse 1s infinite alternate;
}
@keyframes gwzPulse 
{
  from { transform: scale(1); box-shadow: 0 0 4px rgba(239, 68, 68, 0.5); }
  to { transform: scale(1.1); box-shadow: 0 0 12px rgba(239, 68, 68, 0.85); }
}

.gwz-btn-ativo-transcricao 
{
  background-color: #28a745 !important;
  color: #ffffff !important;
  border-color: #218838 !important;
  font-weight: 700 !important;
}

.gwz-audio-transcricao-box 
{
  margin-top: 6px;
  padding: 6px 10px;
  background: #ffffff;
  border-left: 3px solid var(--gwz-rodapé-blue);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--gwz-text-white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  animation: gwzFadeIn 0.25s ease;
}

.gwz-file-bubble-box 
{
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--gwz-rodapé-border);
  margin: 4px 0;
  color: var(--gwz-text-white);
  text-decoration: none !important;
}
.gwz-file-bubble-box:hover 
{
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ==========================================================
   3. BOTÕES (PADRÃO GLOBAL)
   ========================================================== */
.gwz-app-wrapper button,
.gwz-app-wrapper .btn,
.gwz-app-wrapper .gwz-subbar-btn,
.gwz-app-wrapper .gwz-quick-btn,
.gwz-app-wrapper .gwz-icon-btn,
.gwz-app-wrapper .gwz-action-btn,
.gwz-app-wrapper .gwz-btn-send 
{
  cursor: pointer;
  border-radius: 4px !important;
  transition: all 0.2s ease-in-out !important;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.gwz-app-wrapper button:hover,
.gwz-app-wrapper .btn:hover,
.gwz-app-wrapper .gwz-subbar-btn:hover,
.gwz-app-wrapper .gwz-quick-btn:hover,
.gwz-app-wrapper .gwz-icon-btn:hover,
.gwz-app-wrapper .gwz-action-btn:hover,
.gwz-app-wrapper .gwz-btn-send:hover 
{
  filter: brightness(1.06);
  box-shadow: 0 2px 6px rgba(49, 144, 187, 0.25) !important;
  transform: translateY(-1px);
}

/* ==========================================================
   4. BARRA SUPERIOR (MARCA / ATENDENTE / STATUS)
   ========================================================== */
.gwz-top-brand-bar 
{
  width: 100%;
  min-height: 52px;
  background-color: var(--gwz-rodapé-bg);
  border: 1px solid var(--gwz-rodapé-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.gwz-brand-title-box 
{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  background: var(--gwz-rodapé-blue-bg);
  border: 1px solid var(--gwz-rodapé-blue-light);
  padding: 0 12px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(49, 144, 187, 0.15);
  height: 28px !important;
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
}
.gwz-brand-title-box .title-text 
{
  font-size: 12px;
  font-weight: 800;
  color: var(--gwz-text-white);
  line-height: 1;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gwz-brand-title-box .title-text i { color: var(--gwz-rodapé-blue); }

.gwz-attendant-top-pill 
{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  background: var(--gwz-rodapé-blue-bg);
  border: 1px solid var(--gwz-rodapé-blue-light);
  padding: 0 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700 !important;
  color: #000000 !important;
  height: 28px !important;
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gwz-attendant-top-pill i { color: #000000 !important; }
.gwz-attendant-top-pill span { color: #000000 !important; font-weight: 700 !important; }
.gwz-attendant-top-pill b { color: #000000 !important; font-weight: 900 !important; }

.gwz-top-brand-bar #gwzBtnStatusInstancia,
.gwz-top-brand-bar .gwz-btn-top-supervisor,
.gwz-top-brand-bar .gwz-brand-logo-pill 
{
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
  margin: 0 !important;
}

.gwz-brand-logo-pill 
{
  gap: 1px;
  background: var(--gwz-rodapé-sidebar);
  border: 1px solid var(--gwz-rodapé-border);
  border-radius: 4px;
}
.gwz-brand-logo-pill .brand-ponto { font-weight: 700; color: #1c3647; }
.gwz-brand-logo-pill .brand-com { font-weight: 800; color: var(--gwz-rodapé-blue); }
.gwz-brand-logo-pill .brand-sistemas { font-size: 10px; color: var(--gwz-text-muted); text-transform: lowercase; margin-left: 3px; }

/* ==========================================================
   5. BARRA DE FILTROS
   ========================================================== */
.gwz-filter-subbar 
{
  width: 100%;
  background-color: var(--gwz-rodapé-bg);
  border: 1px solid var(--gwz-rodapé-border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 8px;
  flex-shrink: 0;
}
.gwz-filter-subbar > div:first-child 
{
  padding-top: 4px;
  padding-bottom: 3px;
}
.gwz-subbar-btn 
{
  height: 25px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  background: #ffffff;
  color: var(--gwz-text-sub);
  border: 1px solid var(--gwz-rodapé-border);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.gwz-subbar-btn:hover 
{
  background-color: var(--gwz-rodapé-hover);
  color: var(--gwz-rodapé-blue);
  border-color: var(--gwz-rodapé-blue-light);
}
.gwz-subbar-btn.active 
{
  background-color: var(--gwz-rodapé-blue);
  color: #ffffff;
  border-color: var(--gwz-rodapé-blue);
}

/* ==========================================================
   6. SIDEBAR (LISTA DE CONVERSAS)
   ========================================================== */
.gwz-sidebar 
{
  width: 330px;
  min-width: 300px;
  max-width: 370px;
  border-right: 1px solid var(--gwz-rodapé-border);
  display: flex;
  flex-direction: column;
  background-color: var(--gwz-rodapé-sidebar);
  flex-shrink: 0;
  height: 100%;
}
.gwz-header 
{
  height: 44px;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid var(--gwz-rodapé-border);
  flex-shrink: 0;
}

.gwz-sidebar-tabs 
{
  display: flex;
  background: var(--gwz-rodapé-sidebar);
  border-bottom: 1px solid var(--gwz-rodapé-border);
  flex-shrink: 0;
}
.gwz-sidebar-tab 
{
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--gwz-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
}
.gwz-sidebar-tab:hover 
{
  color: var(--gwz-rodapé-blue);
}
.gwz-sidebar-tab.active 
{
  color: var(--gwz-rodapé-blue);
  border-bottom-color: var(--gwz-rodapé-blue);
  background: #ffffff;
}

.gwz-search-bar 
{
  padding: 6px 8px;
  background-color: var(--gwz-rodapé-sidebar);
  border-bottom: 1px solid var(--gwz-rodapé-border);
  flex-shrink: 0;
}

.gwz-search-input 
{
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--gwz-rodapé-border);
  border-radius: 4px;
  padding: 6px 10px;
  color: var(--gwz-text-white);
  font-size: 13px;
  font-weight: 500;
  outline: none;
}
.gwz-search-input::placeholder 
{
  color: #406277 !important;
  opacity: 1 !important;
}

.gwz-chat-list 
{
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--gwz-rodapé-sidebar);
}
.gwz-chat-list::-webkit-scrollbar { width: 5px; }
.gwz-chat-list::-webkit-scrollbar-thumb { background: var(--gwz-rodapé-border); }

.gwz-chat-list-item 
{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-left: 3px solid transparent;
  border-bottom: 1px solid #e5edf2;
  transition: background 0.15s ease, border-left 0.15s ease;
  background: transparent;
  text-decoration: none;
  min-height: 135px; 
  width: 100%;
  box-sizing: border-box;
}
.gwz-chat-list-item:hover 
{
  background-color: var(--gwz-rodapé-hover) !important;
}
.gwz-chat-list-item.selecionado 
{
  background-color: #e7f3ff !important;
  border-left: 3px solid #25D366 !important;
}

.gwz-cli-avatar 
{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #3190BB;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  text-transform: uppercase;
  margin-top: 2px;
}
.gwz-cli-avatar img 
{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.gwz-cli-info 
{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px; 
  overflow: hidden;
}

.gwz-cli-linha1,
.gwz-cli-linha2 
{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  width: 100%;
  overflow: hidden;
}

.gwz-cli-linha3 
{
  width: 100%;
  margin-top: 2px;
  overflow: hidden;
  font-size: 11px !important;
  color: #000000 !important;
  line-height: 1.3;
}

.gwz-cli-nome 
{
  font-size: 13.5px;
  color: #000000 !important;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.gwz-chat-list-item.selecionado .gwz-cli-nome 
{
  font-weight: 800;
  color: #000000 !important;
}

.gwz-cli-hora 
{
  font-size: 11px;
  color: #000000 !important;
  font-weight: 600;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gwz-cli-msg 
{
  font-size: 12px;
  color: #000000 !important;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.gwz-badge-novo 
{
  background: #25D366;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
}

.gwz-badge-nao-lidas 
{
  background: #25D366;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
  margin-left: 4px;
}

/* ==========================================================
   7. ÁREA PRINCIPAL (MENSAGENS / BARRA RÁPIDA / INPUT)
   ========================================================== */
.gwz-main 
{
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #f7fafc;
  position: relative;
  overflow: hidden;
}

.gwz-messages-container 
{
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-color: #eef5f8;
  background-image: radial-gradient(rgba(49, 144, 187, 0.08) 1px, transparent 1px);
  background-size: 16px 16px;
}
.gwz-messages-container::-webkit-scrollbar { width: 5px; }
.gwz-messages-container::-webkit-scrollbar-thumb { background: var(--gwz-rodapé-border); border-radius: 3px; }

.gwz-msg-bubble-operador 
{
  align-self: flex-end;
  background: var(--gwz-rodapé-blue);
  border-radius: 6px;
  border-top-right-radius: 2px;
  max-width: 76%;
  padding: 8px 12px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(49, 144, 187, 0.25);
  margin-bottom: 4px;
  word-break: break-word;
  position: relative;
}
.gwz-msg-bubble-paciente 
{
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--gwz-rodapé-border);
  border-radius: 6px;
  border-top-left-radius: 2px;
  max-width: 76%;
  padding: 8px 12px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #1c3647;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  margin-bottom: 4px;
  word-break: break-word;
  position: relative;
}

.gwz-msg-bubble-operador .gwz-btn-del-msg,
.gwz-msg-bubble-paciente .gwz-btn-del-msg 
{
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.gwz-msg-bubble-operador:hover .gwz-btn-del-msg,
.gwz-msg-bubble-paciente:hover .gwz-btn-del-msg 
{
  opacity: 1;
}
.gwz-msg-bubble-operador .gwz-btn-del-msg:hover,
.gwz-msg-bubble-paciente .gwz-btn-del-msg:hover 
{
  transform: scale(1.1);
  background: #fee2e2;
  border-color: #fecaca;
}
.gwz-msg-bubble-operador .gwz-btn-del-msg i,
.gwz-msg-bubble-paciente .gwz-btn-del-msg i 
{
  color: #dc2626;
  font-size: 11px;
}

.gwz-quick-toolbar 
{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  background-color: #ffffff;
  border-top: 1px solid var(--gwz-rodapé-border);
  flex-shrink: 0;
  max-height: 80px;
  overflow-y: auto;
}
.gwz-quick-btn 
{
  background-color: var(--gwz-rodapé-sidebar);
  border: 1px solid var(--gwz-rodapé-border);
  color: var(--gwz-text-white);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.gwz-input-area 
{
  position: relative; /* Necessário para o preview flutuante */  
  min-height: 52px;
  height: auto; 
  background-color: #ffffff;
  display: flex;
  align-items: flex-end; 
  padding: 8px 12px;
  gap: 6px;
  border-top: 1px solid var(--gwz-rodapé-border);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  flex-wrap: wrap;
}

/* ESTILO DA DIV CONTENTEDITABLE */
.gwz-msg-input 
{
  flex: 1;
  min-height: 38px;
  max-height: 120px; 
  overflow-y: auto;
  background-color: #f7fafc;
  border: 1px solid var(--gwz-rodapé-border);
  border-radius: 4px;
  padding: 9px 12px;
  color: var(--gwz-text-white);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap; 
}

.gwz-msg-input:empty:before {
  content: attr(placeholder);
  color: #406277 !important;
  opacity: 1 !important;
  font-size: 13.5px;
  pointer-events: none;
  display: block;
}

.gwz-msg-input:focus { 
  border-color: var(--gwz-rodapé-border-focus); 
  background-color: #ffffff; 
}

.gwz-icon-btn 
{
  background: transparent;
  border: 1px solid transparent;
  color: var(--gwz-text-muted);
  font-size: 15px;
  padding: 6px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gwz-btn-send 
{
  background-color: var(--gwz-rodapé-blue);
  color: #fff;
  border: none;
  border-radius: 4px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.gwz-template-dropdown 
{
  position: absolute;
  bottom: 56px;
  left: 12px;
  width: 380px;
  max-height: 230px;
  background-color: #ffffff;
  border: 1px solid var(--gwz-rodapé-border);
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

/* ==========================================================
   8. PAINEL DIREITO (CONTATO)
   ========================================================== */
.gwz-right-panel 
{
  width: 380px;
  min-width: 340px;
  max-width: 420px;
  border-left: 1px solid var(--gwz-rodapé-border);
  background-color: var(--gwz-rodapé-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
}
.gwz-panel-content 
{
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
}
.gwz-panel-content::-webkit-scrollbar { width: 5px; }
.gwz-panel-content::-webkit-scrollbar-thumb { background: var(--gwz-rodapé-border); }

.gwz-info-card 
{
  background: #ffffff;
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--gwz-rodapé-border);
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.gwz-info-label 
{
  color: var(--gwz-text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gwz-info-val { color: var(--gwz-text-white); font-size: 12.5px; font-weight: 700; }

#gwzPanelContentArea .gwz-info-card:has(button, a) > div[style*="grid"],
#gwzPanelContentArea .gwz-acoes-grid,
.gwz-acoes-container-grid 
{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  width: 100% !important;
}

#gwzPanelContentArea .gwz-info-card button,
#gwzPanelContentArea .gwz-info-card a.btn,
#gwzPanelContentArea .gwz-info-card a[class*="btn"] 
{
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  width: 100% !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 8px !important;
  box-sizing: border-box !important;
  gap: 6px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#gwzPanelContentArea .gwz-info-card button i,
#gwzPanelContentArea .gwz-info-card a i 
{
  width: 14px !important;
  min-width: 14px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  margin-right: 2px !important;
}

#gwzPanelContentArea .gwz-info-card button span,
#gwzPanelContentArea .gwz-info-card a span 
{
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-align: left !important;
  flex: 1 !important;
}

/* ==========================================================
   9. MODAIS E TABELAS
   ========================================================== */
.gwz-modal-overlay 
{
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(28, 54, 71, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.gwz-queue-table { width: 100%; border-collapse: collapse; text-align: left; }
.gwz-queue-table th 
{
  background-color: var(--gwz-rodapé-sidebar);
  color: var(--gwz-text-sub);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 9px 12px;
  border-bottom: 1px solid var(--gwz-rodapé-border);
  white-space: nowrap;
}
.gwz-queue-table td 
{
  padding: 9px 12px;
  border-bottom: 1px solid var(--gwz-rodapé-border);
  font-size: 12px;
  color: var(--gwz-text-white);
}
.gwz-queue-table td span { white-space: nowrap !important; }
.gwz-queue-table tr:hover td { background-color: var(--gwz-rodapé-hover); }

/* ==========================================================
   10. CARD "COMO CHEGAR" (CLÍNICA PSIQUE)
   ========================================================== */
.psique-card-box 
{
  background: #ffffff;
  border-radius: 10px;
  border: 1.5px solid #005696;
  box-shadow: 0 10px 30px rgba(0, 86, 150, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.psique-card-topo 
{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
}
.psique-logo-petala { width: 42px; height: 42px; flex-shrink: 0; }
.psique-topo-textos { display: flex; flex-direction: column; }
.psique-topo-nome { font-size: 18px; font-weight: 900; color: #005696; letter-spacing: 0.5px; line-height: 1.1; }
.psique-topo-sub { font-size: 10px; font-weight: 700; color: #0077b6; letter-spacing: 1.2px; text-transform: uppercase; margin-top: 2px; }
.psique-faixa-azul { background: #005696; color: #ffffff; padding: 6px 16px; font-size: 13px; font-weight: 800; display: flex; align-items: center; gap: 6px; letter-spacing: 0.5px; }
.psique-card-corpo { display: flex; padding: 14px 16px; background: #fdfdfd; gap: 12px; align-items: center; }
.psique-info-lista { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: #2b3a4a; }
.psique-info-item { display: flex; align-items: flex-start; gap: 6px; line-height: 1.35; }
.psique-info-item i { color: #0077b6; font-size: 13px; margin-top: 2px; flex-shrink: 0; }
.psique-mapa-ilustra { width: 96px; height: 96px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.psique-card-botoes-rodape { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 10px 14px; background: #f0f6fa; border-top: 1px solid #d9e7f0; }
.psique-btn-acao { border: none; border-radius: 6px; padding: 8px 4px; font-size: 10.5px; font-weight: 800; color: #ffffff; display: flex; align-items: center; justify-content: center; gap: 4px; text-decoration: none !important; box-shadow: 0 2px 4px rgba(0,0,0,0.12); transition: transform 0.15s ease; }
.psique-btn-acao:hover { filter: brightness(1.08); transform: translateY(-1px); color: #ffffff; }
.psique-btn-maps  { background: #005696; }
.psique-btn-waze  { background: #29b6f6; color: #053b5a !important; }
.psique-btn-ligar { background: #003e6b; }

/* ==========================================================
   11. LIGHTBOX (IMAGENS / VÍDEOS)
   ========================================================== */
#gwz-lightbox 
{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2147483000;
  align-items: center;
  justify-content: center;
  animation: gwzFade 0.15s ease-out;
}
@keyframes gwzFade { from { opacity: 0; } to { opacity: 1; } }
#gwz-lightbox.gwz-aberto { display: flex; }

#gwz-lightbox .gwz-lb-img 
{
  max-width: 92vw;
  max-height: 86vh;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  background: #111;
  display: block;
}
#gwz-lightbox .gwz-lb-close 
{
  position: absolute;
  top: 14px;
  right: 22px;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  z-index: 2;
}
#gwz-lightbox .gwz-lb-close:hover { color: #ff5c5c; }
#gwz-lightbox .gwz-lb-spin 
{
  position: absolute;
  color: #fff;
  font-size: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.85;
  z-index: 1;
}
#gwz-lightbox .gwz-lb-actions 
{
  position: absolute;
  bottom: 22px;
  right: 22px;
  display: flex;
  gap: 10px;
  z-index: 2;
}
#gwz-lightbox .gwz-lb-btn 
{
  background: #25D366;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
#gwz-lightbox .gwz-lb-btn:hover { background: #1eb955; color: #fff; }
#gwz-lightbox .gwz-lb-caption 
{
  position: absolute;
  bottom: 22px;
  left: 22px;
  color: #fff;
  font-size: 12px;
  opacity: 0.85;
  max-width: 60vw;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
  z-index: 2;
}

  /* CSS extra para o Editor de Imagem (Estilo WhatsApp Web) */
  .gwz-edicao-btn-wa {
    background: transparent;
    border: none;
    color: #54656f;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .gwz-edicao-btn-wa:hover {
    background: #e9edef;
    color: #111b21;
  }
  .gwz-edicao-btn-wa.ativo {
    background: #d9f2ec;
    color: #008069;
  }
  .gwz-edicao-btn-wa.gwz-desabilitado {
    opacity: 0.35;
    pointer-events: none;
  }
  .gwz-edicao-topo {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 8px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e9edef;
  }
  .gwz-edicao-grupo {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .gwz-edicao-cor {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 2px solid #d1d7db;
    border-radius: 50%;
    background: none;
    cursor: pointer;
  }
  .gwz-edicao-legenda-barra {
    display: flex;
    justify-content: center;
    padding: 10px 20px;
    background: #f0f2f5;
  }
  .gwz-edicao-legenda-pill {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d1d7db;
    border-radius: 24px;
    padding: 6px 14px;
    width: 100%;
    max-width: 720px;
  }
  .gwz-edicao-rodape {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 90px 10px 20px;
    background: #ffffff;
    border-top: 1px solid #e9edef;
  }
  .gwz-mini-lista {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    max-width: calc(100% - 70px);
    padding: 4px;
  }
  .gwz-mini-wa {
    position: relative;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.75;
    background: #f0f2f5;
  }
  .gwz-mini-wa.sel {
    border-color: #00a884;
    opacity: 1;
  }
  .gwz-mini-wa img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .gwz-mini-x {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 9px;
    background: rgba(17, 27, 33, 0.55);
    color: #ffffff;
    border-radius: 50%;
    display: none;
  }
  .gwz-mini-wa:hover .gwz-mini-x {
    display: block;
  }
  .gwz-mini-add {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 6px;
    border: 1px dashed #aebac1;
    background: #ffffff;
    color: #54656f;
    font-size: 18px;
    cursor: pointer;
    margin-left: 4px;
  }
  .gwz-mini-add:hover {
    background: #f0f2f5;
  }
  .gwz-edicao-enviar {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: #00a884;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(11, 20, 26, 0.2);
  }
  .gwz-enviando .gwz-edicao-enviar {
    opacity: 0.55;
    pointer-events: none;
  }
  .gwz-enviando .gwz-edicao-topo,
  .gwz-enviando .gwz-mini-lista {
    pointer-events: none;
  }
  .gwz-popover-emoji {
    position: absolute;
    z-index: 110;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    background: #ffffff;
    border: 1px solid #d1d7db;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 6px 20px rgba(11, 20, 26, 0.18);
  }
  .gwz-popover-emoji button {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
  }
  .gwz-popover-emoji button:hover {
    background: #f0f2f5;
  }

body.gwz-lb-travado { overflow: hidden !important; }