@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');

#lumi-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 99999;
  width: 62px; height: 62px; border-radius: 50%;
  background: linear-gradient(135deg, #FFD600, #FFB300);
  box-shadow: 0 6px 24px rgba(180,130,0,0.45);
  cursor: pointer; border: none;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: lumi-pulse 3s ease-in-out infinite;
  padding: 0;
}
#lumi-fab:hover { transform: scale(1.1); box-shadow: 0 8px 30px rgba(180,130,0,0.6); }
#lumi-fab img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; object-position: center 22%; display: block; }
#lumi-fab-badge {
  position: absolute; top: -2px; right: -2px;
  background: #ff4444; color: white; border-radius: 50%;
  width: 18px; height: 18px; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Nunito', sans-serif;
  animation: lumi-badge-in 0.5s ease 2s forwards;
  opacity: 0;
}

#lumi-window {
  position: fixed; bottom: 100px; right: 24px; z-index: 99998;
  width: 380px; max-height: 580px;
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(180,130,0,0.22), 0 4px 20px rgba(0,0,0,0.1);
  background: #fff; display: flex; flex-direction: column;
  border: 2px solid #ffe082; font-family: 'Nunito', sans-serif;
  transform: scale(0.85) translateY(20px);
  opacity: 0; pointer-events: none;
  transition: transform 0.3s cubic-bezier(.34,1.5,.64,1), opacity 0.25s ease;
}
#lumi-window.lumi-open {
  transform: scale(1) translateY(0);
  opacity: 1; pointer-events: all;
}

.lw-header {
  background: linear-gradient(135deg, #FFD600 0%, #FFCA28 60%, #FFB300 100%);
  padding: 13px 16px; display: flex; align-items: center; gap: 10px;
  position: relative; overflow: hidden; flex-shrink: 0;
}
.lw-header::before {
  content: ''; position: absolute; top: -30px; right: -20px;
  width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,0.15);
}
.lw-av-wrap { flex-shrink: 0; animation: lumi-float 3s ease-in-out infinite; z-index: 1; }
.lw-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: center 22%; display: block; }
.lw-title { flex: 1; z-index: 1; }
.lw-title strong { display: block; color: #4a2c00; font-size: 17px; font-weight: 800; line-height: 1.2; }
.lw-title span { color: rgba(74,44,0,0.65); font-size: 10.5px; font-weight: 600; }
.lw-close {
  background: rgba(255,255,255,0.3); border: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 16px; color: #4a2c00; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; flex-shrink: 0; z-index: 1;
  font-family: 'Nunito', sans-serif;
}
.lw-close:hover { background: rgba(255,255,255,0.5); }

.lw-msgs {
  flex: 1; overflow-y: auto; padding: 14px 12px 6px;
  display: flex; flex-direction: column; gap: 10px; background: #fffef7;
  min-height: 200px; max-height: 320px;
}
.lw-msgs::-webkit-scrollbar { width: 4px; }
.lw-msgs::-webkit-scrollbar-thumb { background: #f0d880; border-radius: 2px; }

.lw-msg { animation: lumi-in 0.3s cubic-bezier(.34,1.5,.64,1) both; display: flex; gap: 7px; align-items: flex-end; }
.lw-msg.lumi-user { justify-content: flex-end; }
.lw-bubble {
  max-width: 78%; padding: 10px 13px; font-size: 13px;
  line-height: 1.65; font-weight: 500; white-space: pre-wrap; word-break: break-word;
  font-family: 'Nunito', sans-serif;
}
.lw-bubble.lumi-bot {
  border-radius: 18px 18px 18px 4px; background: #fff; color: #3a3a3a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07); border: 1.5px solid #fff3c4;
}
.lw-bubble.lumi-user {
  border-radius: 18px 18px 4px 18px;
  background: linear-gradient(135deg, #FFD600, #FFCA28);
  color: #4a2c00; font-weight: 600;
  box-shadow: 0 3px 10px rgba(255,180,0,0.3);
}
.lw-bubble a,
#lumi-window .lw-bubble a {
  color: #b87800 !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  word-break: break-all;
  cursor: pointer !important;
  pointer-events: all !important;
}
#lumi-window .lw-bubble a:hover {
  color: #8a5a00 !important;
  text-decoration: underline !important;
}
.lw-av-sm { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: center 22%; flex-shrink: 0; margin-bottom: 2px; }

.lw-typing { display: flex; gap: 5px; align-items: center; padding: 2px 0; }
.lw-dot { width: 7px; height: 7px; border-radius: 50%; background: #f5b800; }
.lw-dot:nth-child(1) { animation: lumi-bounce 1.2s ease-in-out 0s infinite; }
.lw-dot:nth-child(2) { animation: lumi-bounce 1.2s ease-in-out 0.2s infinite; }
.lw-dot:nth-child(3) { animation: lumi-bounce 1.2s ease-in-out 0.4s infinite; }

.lw-chips {
  padding: 6px 12px 4px; display: flex; flex-wrap: wrap; gap: 5px;
  background: #fffef7; border-top: 1px solid #fff3c4; flex-shrink: 0;
}
.lw-chip {
  padding: 5px 11px; border-radius: 20px; border: 2px solid #FFD600;
  background: transparent; color: #6a4a00; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: all 0.18s; font-family: 'Nunito', sans-serif;
}
.lw-chip:hover { background: #FFCA28; transform: translateY(-1px); }

.lw-input-row {
  padding: 8px 12px 10px; border-top: 2px solid #fff3c4;
  background: #fffef7; display: flex; gap: 7px; align-items: flex-end; flex-shrink: 0;
}
.lw-ta {
  flex: 1; border: 2px solid #ffe082; border-radius: 14px;
  padding: 9px 12px; font-size: 13px; font-family: 'Nunito', sans-serif;
  font-weight: 500; resize: none; background: #fff; color: #3a3a3a;
  height: 40px; max-height: 100px; line-height: 1.5;
  transition: border-color 0.2s; overflow-y: auto;
}
.lw-ta:focus { outline: none; border-color: #FFD600; }
.lw-ta::placeholder { color: #bba96a; }
.lw-btn {
  width: 40px; height: 40px; min-width: 40px; border-radius: 12px; border: none;
  background: #f0ead8; color: #bba96a; cursor: not-allowed;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: all 0.18s; flex-shrink: 0; font-family: 'Nunito', sans-serif;
}
.lw-btn.lumi-on { background: linear-gradient(135deg, #FFD600, #FFCA28); color: #4a2c00; cursor: pointer; box-shadow: 0 4px 12px rgba(255,180,0,0.35); }
.lw-btn.lumi-on:hover { background: #FFB300; transform: scale(1.05); }

.lw-footer {
  padding: 3px 12px 8px; text-align: center; color: #c9a84c;
  font-size: 10px; font-weight: 600; background: #fffef7; flex-shrink: 0;
}

@keyframes lumi-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }
@keyframes lumi-in { from{opacity:0;transform:translateY(10px) scale(0.97)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes lumi-bounce { 0%,60%,100%{transform:translateY(0);opacity:.5} 30%{transform:translateY(-6px);opacity:1} }
@keyframes lumi-pulse { 0%,100%{box-shadow:0 6px 24px rgba(180,130,0,.45)} 50%{box-shadow:0 6px 32px rgba(180,130,0,.7)} }
@keyframes lumi-badge-in { to{opacity:1} }

@media (max-width: 480px) {
  #lumi-window { right: 8px; left: 8px; width: auto; bottom: 90px; }
  #lumi-fab { right: 16px; bottom: 16px; }
}
