/* WhiskerBot Widget Styles - WhiskerGear.com */

#whisker-bot-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  position: relative;
  z-index: 999999;
}

/* Botão Flutuante */
#wb-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(217, 119, 6, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  z-index: 999999;
  outline: none;
}

#wb-toggle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 26px rgba(217, 119, 6, 0.6);
}

#wb-toggle-btn:active {
  transform: scale(0.95);
}

.wb-cat-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.wb-avatar-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  pointer-events: none;
}

#wb-toggle-btn .wb-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #0f172a;
  color: #fef3c7;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid #ffffff;
  letter-spacing: 0.5px;
}

/* Janela do Chat */
#wb-chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 45px rgba(15, 23, 42, 0.18), 0 0 1px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999998;
}

#wb-chat-window.wb-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.96);
}

/* Header */
.wb-header {
  background: #0f172a;
  color: #ffffff;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #d97706;
}

.wb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.wb-title-box {
  flex: 1;
  min-width: 0;
}

.wb-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.wb-subtitle {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#wb-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

#wb-close-btn:hover {
  color: #ffffff;
}

/* Área de Mensagens */
.wb-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  scroll-behavior: smooth;
}

.wb-msg {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
}

.wb-msg p {
  margin: 0 0 6px 0;
}

.wb-msg p:last-child {
  margin-bottom: 0;
}

.wb-heading {
  display: block;
  margin: 4px 0 2px 0;
  color: #0f172a;
  font-size: 13.5px;
}

.wb-hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 8px 0;
}

.wb-msg-assistant {
  align-self: flex-start;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wb-msg-user {
  align-self: flex-end;
  background: #d97706;
  color: #ffffff;
  border-bottom-right-radius: 3px;
}

/* Links dentro da mensagem (estilo botão) */
.wb-msg a.wb-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #92400e;
  font-weight: 700;
  text-decoration: none;
  background: #fef3c7;
  padding: 4px 9px;
  border-radius: 8px;
  margin: 4px 0 2px 0;
  border: 1px solid #fde68a;
  transition: all 0.15s ease;
}

.wb-msg a.wb-link:hover {
  background: #fde68a;
  border-color: #f59e0b;
  transform: translateY(-1px);
}

/* Typing Dots */
.wb-typing .wb-dots span {
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  animation: wbBlink 1.4s infinite both;
}

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

@keyframes wbBlink {
  0%, 80%, 100% { opacity: 0.2; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* Chips de Sugestão */
.wb-chips {
  padding: 8px 14px 4px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.wb-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 11.5px;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.wb-chip:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

/* Input Area */
.wb-input-area {
  padding: 9px 12px;
  display: flex;
  gap: 8px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

#wb-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13.5px;
  outline: none;
  background: #f8fafc;
  transition: border-color 0.15s ease, background 0.15s ease;
}

#wb-input:focus {
  border-color: #d97706;
  background: #ffffff;
}

#wb-send-btn {
  background: #d97706;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

#wb-send-btn:hover {
  background: #b45309;
}

#wb-send-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

/* Disclaimer */
.wb-disclaimer {
  font-size: 9.5px;
  color: #94a3b8;
  text-align: center;
  padding: 3px 10px 6px 10px;
  background: #ffffff;
  line-height: 1.2;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  #wb-chat-window {
    right: 12px;
    bottom: 82px;
    width: calc(100vw - 24px);
    height: 72vh;
  }
  #wb-toggle-btn {
    bottom: 16px;
    right: 16px;
    width: 54px;
    height: 54px;
  }
}
