/* ──────────────────────────────────────────────────────────────
   valtrum-chatbot.css — Valtrum® Floating Chatbot Widget Styles
   ────────────────────────────────────────────────────────────── */

/* ── Root container ──────────────────────────────────────────── */
#vl-chatbot-root {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  font-family: 'Montserrat', 'Open Sans', sans-serif;
}

/* ── Bubble trigger button ───────────────────────────────────── */
.vl-chat-bubble {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8001c, #b3001e);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(232, 0, 28, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  outline: none;
}
.vl-chat-bubble:hover,
.vl-chat-bubble.active {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(232, 0, 28, 0.55);
}
.vl-chat-bubble.active { background: linear-gradient(135deg, #001f5c, #003087); }

/* Notification badge */
.vl-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f5a623;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  animation: vlPulse 1.5s ease infinite;
}
@keyframes vlPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.2); }
}

/* ── Chat panel ──────────────────────────────────────────────── */
.vl-chat-panel {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 360px;
  max-height: 560px;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.85) translateY(20px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.vl-chat-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Header ──────────────────────────────────────────────────── */
.vl-chat-header {
  background: linear-gradient(135deg, #001f5c, #003087);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.vl-chat-header-info { display: flex; align-items: center; gap: .75rem; }
.vl-chat-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.3);
  flex-shrink: 0;
}
.vl-chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vl-chat-name { font-size: .95rem; font-weight: 700; }
.vl-chat-status {
  display: flex; align-items: center; gap: .35rem;
  font-size: .75rem; color: rgba(255,255,255,.75);
}
.vl-chat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  display: inline-block;
  animation: vlDotPulse 2s ease infinite;
}
@keyframes vlDotPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}
.vl-chat-close {
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  font-size: 1rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.vl-chat-close:hover { background: rgba(255,255,255,.25); }

/* ── Messages area ───────────────────────────────────────────── */
.vl-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  background: #f8f9fa;
}
.vl-chat-messages::-webkit-scrollbar { width: 4px; }
.vl-chat-messages::-webkit-scrollbar-track { background: transparent; }
.vl-chat-messages::-webkit-scrollbar-thumb { background: #d0d5e0; border-radius: 4px; }

.vl-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.vl-chat-user { align-self: flex-end; align-items: flex-end; }
.vl-chat-bot  { align-self: flex-start; align-items: flex-start; }

.vl-chat-bubble-msg {
  padding: .65rem .95rem;
  border-radius: 1.1rem;
  font-size: .875rem;
  line-height: 1.55;
  word-break: break-word;
}
.vl-chat-user .vl-chat-bubble-msg {
  background: linear-gradient(135deg, #e8001c, #b3001e);
  color: #fff;
  border-bottom-right-radius: .3rem;
}
.vl-chat-bot .vl-chat-bubble-msg {
  background: #fff;
  color: #1a1a2e;
  border: 1px solid #e9ecef;
  border-bottom-left-radius: .3rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.vl-chat-bot .vl-chat-bubble-msg a {
  color: #e8001c;
  text-decoration: underline;
}
.vl-chat-time {
  font-size: .68rem;
  color: #9ca3af;
  margin-top: .2rem;
  padding: 0 .3rem;
}

/* ── Typing indicator ────────────────────────────────────────── */
.vl-chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: .1rem 0;
}
.vl-chat-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #adb5bd;
  animation: vlTyping 1.2s ease infinite;
}
.vl-chat-typing span:nth-child(2) { animation-delay: .2s; }
.vl-chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes vlTyping {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50%       { transform: translateY(-5px); opacity: 1; }
}

/* ── Quick-reply suggestions ─────────────────────────────────── */
.vl-chat-suggestions {
  padding: .5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  background: #fff;
  border-top: 1px solid #f0f2f5;
  flex-shrink: 0;
}
.vl-chat-suggestion {
  background: #f0f4ff;
  border: 1px solid #d1dafe;
  color: #001f5c;
  font-size: .75rem;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.vl-chat-suggestion:hover {
  background: #001f5c;
  color: #fff;
  border-color: #001f5c;
}

/* ── Input row ───────────────────────────────────────────────── */
.vl-chat-input-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  background: #fff;
  border-top: 1px solid #e9ecef;
  flex-shrink: 0;
}
.vl-chat-input {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  padding: .55rem 1rem;
  font-size: .875rem;
  outline: none;
  font-family: inherit;
  transition: border-color .2s;
  color: #1a1a2e;
  background: #f8f9fa;
}
.vl-chat-input:focus { border-color: #001f5c; background: #fff; }
.vl-chat-send {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #e8001c, #b3001e);
  color: #fff;
  font-size: .95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(232,0,28,.3);
}
.vl-chat-send:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(232,0,28,.4); }

/* ── Footer ──────────────────────────────────────────────────── */
.vl-chat-footer {
  text-align: center;
  font-size: .7rem;
  color: #9ca3af;
  padding: .45rem;
  background: #fff;
  border-top: 1px solid #f0f2f5;
  flex-shrink: 0;
}
.vl-chat-footer a { color: #e8001c; text-decoration: none; }

/* ── Responsive: smaller on mobile ──────────────────────────── */
@media (max-width: 576px) {
  #vl-chatbot-root { bottom: 1rem; right: 1rem; }
  .vl-chat-panel { width: calc(100vw - 2rem); right: 0; }
  .vl-chat-bubble { width: 52px; height: 52px; font-size: 1.25rem; }
}
