/* =============================================
   HONEY CHAT WIDGET
   ============================================= */

:root {
  --honey-gold: #F4D03F;
  --honey-gold-dark: #d4a800;
  --honey-gold-light: #fffdf0;
  --honey-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  --honey-radius: 16px;
  --honey-z: 9999;
}

/* ---- Toggle Button ---- */
.honey-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--honey-gold);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(212, 168, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--honey-z);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  outline: none;
}
.honey-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(212, 168, 0, 0.55);
}
.honey-toggle:focus-visible {
  outline: 3px solid var(--honey-gold-dark);
  outline-offset: 3px;
}
.honey-toggle i {
  font-size: 24px;
  color: #1a1a1a;
  transition: opacity 0.2s, transform 0.2s;
}
.honey-icon-close { display: none; }

.honey-widget.open .honey-icon-open { display: none; }
.honey-widget.open .honey-icon-close { display: block; }

/* Notification dot */
.honey-toggle::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 11px;
  height: 11px;
  background: #e74c3c;
  border-radius: 50%;
  border: 2px solid #fff;
  transition: opacity 0.3s;
}
.honey-widget.notif-hidden .honey-toggle::after { opacity: 0; }

/* ---- Panel ---- */
.honey-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 360px;
  height: 520px;
  background: #fff;
  border-radius: var(--honey-radius);
  box-shadow: var(--honey-shadow);
  display: flex;
  flex-direction: column;
  z-index: calc(var(--honey-z) - 1);
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transform-origin: bottom right;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.2s ease;
}
.honey-widget.open .honey-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ---- Header ---- */
.honey-header {
  background: var(--honey-gold);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.honey-agent {
  display: flex;
  align-items: center;
  gap: 10px;
}
.honey-avatar {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.honey-agent-info { display: flex; flex-direction: column; line-height: 1.2; }
.honey-name { font-size: 15px; font-weight: 800; color: #1a1a1a; }
.honey-subtitle { font-size: 11px; color: #555; }
.honey-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #27ae60;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.honey-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: #333;
  font-size: 16px;
  display: flex;
  align-items: center;
  transition: background 0.15s;
}
.honey-close-btn:hover { background: rgba(0,0,0,0.1); }

/* ---- Consent Overlay ---- */
.honey-consent {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
}
.honey-consent.hidden { display: none; }
.honey-consent-inner {
  text-align: center;
  max-width: 290px;
}
.honey-consent-icon { font-size: 40px; margin-bottom: 12px; }
.honey-consent-inner h3 {
  font-size: 18px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 10px;
}
.honey-consent-inner p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}
.honey-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  margin-bottom: 20px;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
}
.honey-consent-label input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--honey-gold-dark);
  flex-shrink: 0;
  cursor: pointer;
}
.honey-consent-label a { color: var(--honey-gold-dark); font-weight: 600; }
.honey-start-btn {
  width: 100%;
  background: var(--honey-gold);
  color: #1a1a1a;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.honey-start-btn:hover:not(:disabled) { background: var(--honey-gold-dark); color: #fff; }
.honey-start-btn:active:not(:disabled) { transform: scale(0.98); }
.honey-start-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- Messages Area ---- */
.honey-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.honey-messages::-webkit-scrollbar { width: 4px; }
.honey-messages::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 2px; }

/* Message bubbles */
.honey-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 88%;
  animation: honeyMsgIn 0.2s ease;
}
@keyframes honeyMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.honey-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.honey-msg.assistant { align-self: flex-start; }

.honey-msg-avatar {
  width: 28px;
  height: 28px;
  background: var(--honey-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.honey-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  color: #222;
  word-break: break-word;
}
.honey-msg.user .honey-bubble {
  background: var(--honey-gold);
  border-bottom-right-radius: 4px;
  color: #1a1a1a;
}
.honey-msg.assistant .honey-bubble {
  background: #f5f5f5;
  border-bottom-left-radius: 4px;
}
.honey-bubble ul {
  margin: 6px 0 2px 0;
  padding-left: 18px;
  list-style: disc;
}
.honey-bubble ul li {
  margin-bottom: 3px;
  line-height: 1.5;
}

/* Typing indicator */
.honey-typing .honey-bubble {
  background: #f5f5f5;
  padding: 12px 16px;
}
.honey-dots { display: flex; gap: 4px; align-items: center; }
.honey-dots span {
  width: 7px;
  height: 7px;
  background: #bbb;
  border-radius: 50%;
  animation: honeyDot 1.2s infinite;
}
.honey-dots span:nth-child(2) { animation-delay: 0.2s; }
.honey-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes honeyDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Lead captured success */
.honey-lead-badge {
  align-self: center;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #c8e6c9;
}

/* ---- Input Area ---- */
.honey-input-area {
  border-top: 1px solid #f0f0f0;
  padding: 12px 12px 8px;
  flex-shrink: 0;
  background: #fff;
}
.honey-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.honey-input {
  flex: 1;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 100px;
  min-height: 42px;
  transition: border-color 0.2s;
  line-height: 1.4;
  background: #fafafa;
  color: #222;
}
.honey-input:focus { border-color: var(--honey-gold-dark); background: #fff; }
.honey-input::placeholder { color: #bbb; }
.honey-send {
  width: 42px;
  height: 42px;
  background: var(--honey-gold);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #1a1a1a;
  font-size: 16px;
  transition: background 0.2s, transform 0.1s;
}
.honey-send:hover { background: var(--honey-gold-dark); color: #fff; }
.honey-send:active { transform: scale(0.93); }
.honey-send:disabled { opacity: 0.4; cursor: not-allowed; }

.honey-widget-footer {
  text-align: center;
  font-size: 11px;
  color: #ccc;
  padding: 5px 0 2px;
}
.honey-widget-footer a { color: #bbb; text-decoration: none; }
.honey-widget-footer a:hover { color: var(--honey-gold-dark); }

/* ---- Disclaimer strip ---- */
.honey-disclaimer {
  font-size: 10.5px;
  color: #ccc;
  text-align: center;
  padding: 0 12px 6px;
  line-height: 1.4;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .honey-panel {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 88px;
    height: 72vh;
    max-height: 520px;
  }
  .honey-toggle { bottom: 16px; right: 16px; }
}
