/* ===============================
   RESET (IMPORTANT)
================================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===============================
   CHAT BUBBLE
================================ */
#coyot-chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 9999;
}

#coyot-chat-bubble:hover {
  transform: scale(1.08);
}

/* 🔥 CRITICAL FIX */
#coyot-chat-bubble img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  display: block;
}

.bubble-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  pointer-events: none;   /* 🔥 CRITICAL FIX */
}

/* ===============================
   CHAT WINDOW
================================ */
#coyot-chat-window {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 360px;
  height: 520px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* hidden by default */
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;

  z-index: 9999;
}

#coyot-chat-window.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* ===============================
   HEADER
================================ */
#coyot-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  font-weight: 600;
  font-size: 16px;
  background: linear-gradient(135deg, #6a5af9, #8f67ff);
  color: white;
}

.header-logo {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
}

/* ===============================
   CHAT BODY
================================ */
#coyot-chat-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #f6f7fb;
}

/* ===============================
   MESSAGES
================================ */
.message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.message.bot {
  justify-content: flex-start;
}

.message.user {
  justify-content: flex-end;
}

/* BOT AVATAR */
.bot-avatar {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 8px;
}

/* MESSAGE BUBBLES */
.bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.message.bot .bubble {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #111827;
}

.user-bubble {
  background: #6a5af9;
  color: white;
}

/* ===============================
   MENU BUTTONS
================================ */
#coyot-chat-body button {
  width: 100%;
  margin: 6px 0;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #eef2ff;
  cursor: pointer;
  font-size: 14px;
}

#coyot-chat-body button:hover {
  background: #dbeafe;
}

/* ===============================
   INPUT AREA
================================ */
#coyot-chat-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #e5e7eb;
}

#coyot-input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  outline: none;
}

#coyot-send {
  margin-left: 8px;
  padding: 10px 14px;
  background: #6a5af9;
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
}
/* ===============================
   HEADER ACTIONS
================================ */
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-right {
  margin-left: auto;
}

/* ===============================
   RESET BUTTON (Cross-browser fix)
================================ */
#coyot-reset-btn {
  background: transparent;
  border: none;
  color: white;

  font-size: 30px;        /* 🔥 force same size */
  line-height: 1;
  padding: 6px 8px;       /* 🔥 consistent click area */
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 32px;
  min-height: 32px;
}

#coyot-reset-btn:hover {
  opacity: 0.85;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}


/* ===============================
   RESET CONFIRM MODAL
================================ */
#coyot-reset-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

#coyot-reset-box {
  background: white;
  padding: 20px;
  border-radius: 14px;
  width: 80%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

#coyot-reset-box h4 {
  margin: 0 0 12px;
}

.reset-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.reset-actions button {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.reset-confirm {
  background: #6a5af9;
  color: white;
}

.reset-cancel {
  background: #e5e7eb;
}
