/* Galileo Hub | eva.css */
/* Eva Widget - estilos isolados com prefixo .eva- */

:root {
  --eva-azul: #00345d;
  --eva-azul-escuro: #001f3a;
  --eva-ciano: #00a2b7;
  --eva-laranja: #f2a400;
  --eva-cinza-claro: #f3f3f4;
  --eva-cinza-borda: #e5e7eb;
  --eva-cinza-texto: #42474e;
  --eva-branco: #ffffff;
  --eva-shadow: 0 20px 50px rgba(0, 52, 93, 0.18);
  --eva-shadow-bubble: 0 8px 24px rgba(0, 52, 93, 0.25);
  --eva-radius-window: 16px;
  --eva-radius-bubble-msg: 14px;
}

/* BOLHA FLUTUANTE */
.eva-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--eva-azul);
  border: 3px solid var(--eva-ciano);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--eva-shadow-bubble);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: visible;
  padding: 0;
}
.eva-launcher:hover { transform: scale(1.06); box-shadow: 0 12px 32px rgba(0, 52, 93, 0.35); }
.eva-launcher img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.eva-launcher-placeholder { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 32px; color: var(--eva-branco); letter-spacing: -1px; }
.eva-launcher-status { position: absolute; bottom: 2px; right: 2px; width: 16px; height: 16px; background: #22c55e; border: 2.5px solid var(--eva-branco); border-radius: 50%; z-index: 3; }
.eva-launcher::before,.eva-launcher::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: var(--eva-ciano); animation: eva-pulse 2s ease-out infinite; z-index: -1; }
.eva-launcher::after { animation-delay: 0.75s; }
@keyframes eva-pulse { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(2.2); opacity: 0; } }
.eva-launcher.eva-hidden { display: none; }

/* TOOLTIP */
.eva-launcher-tooltip { position: absolute; right: 76px; top: 50%; transform: translateY(-50%); background: var(--eva-azul-escuro); color: var(--eva-branco); padding: 8px 14px; border-radius: 10px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.eva-launcher-tooltip::after { content: ''; position: absolute; right: -5px; top: 50%; transform: translateY(-50%); border-left: 6px solid var(--eva-azul-escuro); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.eva-launcher:hover .eva-launcher-tooltip { opacity: 1; }

/* JANELA */
.eva-window { position: fixed; bottom: 24px; right: 24px; z-index: 9999; width: 380px; height: 600px; max-height: calc(100vh - 48px); background: var(--eva-branco); border-radius: var(--eva-radius-window); box-shadow: var(--eva-shadow); display: flex; flex-direction: column; overflow: hidden; font-family: 'Inter', sans-serif; transform-origin: bottom right; animation: eva-window-open 0.28s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes eva-window-open { from { opacity: 0; transform: scale(0.92) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.eva-window.eva-hidden { display: none; }

/* HEADER */
.eva-header { background: var(--eva-azul); color: var(--eva-branco); padding: 16px 18px; display: flex; align-items: center; gap: 12px; position: relative; flex-shrink: 0; }
.eva-header-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--eva-azul-escuro); border: 2px solid var(--eva-ciano); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.eva-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.eva-header-avatar-placeholder { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 18px; color: var(--eva-branco); }
.eva-header-info { flex: 1; min-width: 0; }
.eva-header-name { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 16px; letter-spacing: -0.2px; margin: 0; line-height: 1.2; }
.eva-header-subtitle { font-size: 12px; font-weight: 400; opacity: 0.75; margin: 2px 0 0 0; display: flex; align-items: center; gap: 6px; }
.eva-header-status-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; display: inline-block; }
.eva-header-close { background: transparent; border: none; color: var(--eva-branco); cursor: pointer; padding: 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; opacity: 0.75; transition: opacity 0.15s ease, background 0.15s ease; }
.eva-header-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.eva-header-close svg { width: 20px; height: 20px; }

/* BODY */
.eva-body { flex: 1; overflow-y: auto; background: var(--eva-cinza-claro); display: flex; flex-direction: column; }
.eva-body::-webkit-scrollbar { width: 6px; }
.eva-body::-webkit-scrollbar-thumb { background: rgba(0, 52, 93, 0.2); border-radius: 3px; }

/* FORM */
.eva-form { padding: 28px 24px; display: flex; flex-direction: column; gap: 18px; background: var(--eva-branco); flex: 1; }
.eva-form-greeting { font-family: 'Inter', sans-serif; font-size: 15px; line-height: 1.55; color: var(--eva-cinza-texto); margin: 0 0 6px 0; }
.eva-form-greeting strong { color: var(--eva-azul); font-weight: 700; }
.eva-form-field { display: flex; flex-direction: column; gap: 6px; }
.eva-form-label { font-size: 12px; font-weight: 600; color: var(--eva-cinza-texto); text-transform: uppercase; letter-spacing: 0.5px; }
.eva-form-input { font-family: 'Inter', sans-serif; font-size: 15px; padding: 12px 14px; border: 1.5px solid var(--eva-cinza-borda); border-radius: 10px; background: var(--eva-branco); color: var(--eva-azul-escuro); transition: border-color 0.15s ease, box-shadow 0.15s ease; outline: none; }
.eva-form-input:focus { border-color: var(--eva-ciano); box-shadow: 0 0 0 3px rgba(0, 162, 183, 0.15); }
.eva-form-input.eva-form-input-error { border-color: #dc2626; }
.eva-form-error { font-size: 12px; color: #dc2626; margin-top: 2px; }
.eva-form-submit { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 14px; letter-spacing: 0.5px; text-transform: uppercase; background: var(--eva-laranja); color: var(--eva-azul-escuro); padding: 14px 20px; border: none; border-radius: 10px; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease; margin-top: 6px; }
.eva-form-submit:hover { transform: translateY(-1px); background: #ffb620; }
.eva-form-submit:active { transform: translateY(0); }
.eva-form-disclaimer { font-size: 11px; line-height: 1.55; color: var(--eva-cinza-texto); margin: 8px 0 0 0; text-align: center; }
.eva-form-disclaimer a { color: var(--eva-ciano); text-decoration: underline; }

/* MENSAGENS */
.eva-messages { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 12px 16px; flex: 1; }
.eva-msg { max-width: 82%; padding: 10px 14px; border-radius: var(--eva-radius-bubble-msg); font-size: 14px; line-height: 1.5; word-wrap: break-word; animation: eva-msg-in 0.25s ease-out; }
@keyframes eva-msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.eva-msg-eva { align-self: flex-start; background: var(--eva-branco); color: var(--eva-azul-escuro); border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.eva-msg-user { align-self: flex-end; background: var(--eva-ciano); color: var(--eva-branco); border-bottom-right-radius: 4px; }
.eva-msg-time { font-size: 10px; opacity: 0.55; margin-top: 4px; display: block; }
.eva-typing { align-self: flex-start; background: var(--eva-branco); padding: 12px 16px; border-radius: var(--eva-radius-bubble-msg); border-bottom-left-radius: 4px; display: inline-flex; gap: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.eva-typing-dot { width: 7px; height: 7px; background: var(--eva-ciano); border-radius: 50%; animation: eva-typing-bounce 1.2s infinite ease-in-out; }
.eva-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.eva-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes eva-typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* COMPOSER */
.eva-composer { flex-shrink: 0; padding: 12px; background: var(--eva-branco); border-top: 1px solid var(--eva-cinza-borda); display: flex; align-items: flex-end; gap: 8px; }
.eva-composer-input { flex: 1; font-family: 'Inter', sans-serif; font-size: 14px; line-height: 1.45; padding: 10px 12px; border: 1.5px solid var(--eva-cinza-borda); border-radius: 12px; background: var(--eva-cinza-claro); color: var(--eva-azul-escuro); resize: none; outline: none; max-height: 120px; min-height: 40px; transition: border-color 0.15s ease; }
.eva-composer-input:focus { border-color: var(--eva-ciano); background: var(--eva-branco); }
.eva-composer-send { width: 40px; height: 40px; border-radius: 50%; background: var(--eva-laranja); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.15s ease, background 0.15s ease; }
.eva-composer-send:hover { background: #ffb620; transform: scale(1.05); }
.eva-composer-send:disabled { background: var(--eva-cinza-borda); cursor: not-allowed; transform: none; }
.eva-composer-send svg { width: 18px; height: 18px; fill: var(--eva-azul-escuro); }
.eva-composer-send:disabled svg { fill: var(--eva-cinza-texto); opacity: 0.5; }

/* MOBILE */
@media (max-width: 640px) {
  .eva-launcher { width: 64px; height: 64px; bottom: 92px; right: 16px; }
  .eva-launcher-tooltip { display: none; }
  .eva-window { bottom: 0; right: 0; left: 0; top: 0; width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .eva-form { padding: 24px 20px; }
}
@media (max-height: 500px) and (max-width: 900px) {
  .eva-window { bottom: 0; right: 0; left: 0; top: 0; width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
}
