/* ═══════════════════════════════════════════════════════════
   Lava Heat Italia — Chat Widget Styles
   File: lhi-chat.css
   Location: /wp-content/themes/hello-theme-child-master/lhi-chat.css
═══════════════════════════════════════════════════════════ */

/* Brand color variables */
:root {
  --lhi-obsidian: #0e0e0c;
  --lhi-charcoal: #2a2a28;
  --lhi-ember:    #ce2b37;
  --lhi-ember-d:  #a32028;
  --lhi-ash:      #6b6b67;
  --lhi-ivory:    #f5f0e8;
  --lhi-cream:    #faf7f1;
}

/* ─── LAUNCHER BUTTON ──────────────────────────────────── */
.lhi-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--lhi-obsidian);
  color: var(--lhi-cream);
  border: 2px solid var(--lhi-ember);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
  z-index: 999998;
  transition: transform 0.2s, box-shadow 0.2s;
}
.lhi-chat-launcher:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(206,43,55,0.35);
}
.lhi-chat-launcher svg {
  width: 26px;
  height: 26px;
}
.lhi-chat-launcher .lhi-chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--lhi-ember);
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
}
.lhi-chat-launcher.lhi-hidden { display: none; }

/* ─── CHAT WINDOW ──────────────────────────────────────── */
.lhi-chat-window {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  height: 580px;
  max-height: calc(100vh - 48px);
  background: var(--lhi-cream);
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.32);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  border: 1px solid rgba(0,0,0,0.08);
}
.lhi-chat-window.lhi-open {
  display: flex;
}

/* ─── HEADER ───────────────────────────────────────────── */
.lhi-chat-header {
  background: var(--lhi-obsidian);
  color: var(--lhi-cream);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--lhi-ember);
}
.lhi-chat-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.lhi-chat-subtitle {
  font-size: 11px;
  color: var(--lhi-ash);
  margin-top: 2px;
}
.lhi-chat-subtitle::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.lhi-chat-close {
  background: none;
  border: none;
  color: var(--lhi-cream);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lhi-chat-close:hover { opacity: 1; }

/* ─── MESSAGES ─────────────────────────────────────────── */
.lhi-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--lhi-cream);
}
.lhi-chat-messages::-webkit-scrollbar {
  width: 6px;
}
.lhi-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}

.lhi-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  word-wrap: break-word;
}
.lhi-msg.lhi-bot {
  background: white;
  color: var(--lhi-obsidian);
  border: 1px solid rgba(0,0,0,0.06);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.lhi-msg.lhi-user {
  background: var(--lhi-obsidian);
  color: var(--lhi-cream);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.lhi-msg strong { color: var(--lhi-ember); font-weight: 700; }
.lhi-msg.lhi-user strong { color: var(--lhi-cream); }
.lhi-msg em { font-style: italic; opacity: 0.9; }
.lhi-msg br { line-height: 1.4; }
.lhi-msg a { color: var(--lhi-ember); text-decoration: underline; }

.lhi-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
}
.lhi-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lhi-ash);
  animation: lhi-bounce 1.4s infinite ease-in-out;
}
.lhi-typing span:nth-child(2) { animation-delay: 0.2s; }
.lhi-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes lhi-bounce {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}

/* ─── SUGGESTIONS ──────────────────────────────────────── */
.lhi-suggestions {
  padding: 0 16px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--lhi-cream);
}
.lhi-suggestion-btn {
  background: white;
  color: var(--lhi-obsidian);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.lhi-suggestion-btn:hover {
  background: var(--lhi-obsidian);
  color: var(--lhi-cream);
  border-color: var(--lhi-obsidian);
}

/* ─── INPUT ────────────────────────────────────────────── */
.lhi-chat-input-wrap {
  background: white;
  padding: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.lhi-chat-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.lhi-chat-input {
  flex: 1;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 18px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: inherit;
  resize: none;
  max-height: 100px;
  outline: none;
  background: var(--lhi-cream);
  color: var(--lhi-obsidian);
  transition: border-color 0.2s;
}
.lhi-chat-input:focus {
  border-color: var(--lhi-ember);
}
.lhi-chat-send {
  background: var(--lhi-obsidian);
  color: var(--lhi-cream);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.lhi-chat-send:hover { background: var(--lhi-ember); }
.lhi-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.lhi-chat-send svg { width: 16px; height: 16px; }

/* ─── FOOTER ───────────────────────────────────────────── */
.lhi-chat-footer {
  text-align: center;
  font-size: 10px;
  color: var(--lhi-ash);
  padding: 8px;
  background: var(--lhi-cream);
  border-top: 1px solid rgba(0,0,0,0.05);
  letter-spacing: 0.03em;
}
.lhi-chat-footer a {
  color: var(--lhi-ember);
  text-decoration: none;
}

/* ─── MOBILE ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .lhi-chat-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
  .lhi-chat-launcher {
    bottom: 16px;
    right: 16px;
    width: 54px;
    height: 54px;
  }
}
