/* Paula Chatbot Widget */
#paula-widget { position: fixed; bottom: 24px; right: 24px; z-index: 9999; font-family: 'Inter', sans-serif; }

/* FAB button */
.paula-fab {
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #09a4bd, #0a7e94);
  box-shadow: 0 4px 20px rgba(9,164,189,.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.paula-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(9,164,189,.5); }
.paula-fab.active { transform: scale(0); pointer-events: none; }
.paula-icon { pointer-events: none; }

.paula-badge {
  position: absolute; top: -2px; right: -2px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #0a1628;
}

/* Chat window */
.paula-chat {
  position: absolute; bottom: 72px; right: 0;
  width: 380px; max-height: 520px;
  background: #0f1d32; border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  transform: scale(0.8) translateY(20px); opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .2s ease;
  transform-origin: bottom right;
}
.paula-chat.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: auto; }

/* Header */
.paula-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #09a4bd, #0a7e94);
  color: #fff;
}
.paula-header-info { display: flex; align-items: center; gap: 10px; }
.paula-avatar-sm {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
}
.paula-close {
  background: none; border: none; color: #fff; font-size: 22px; cursor: pointer;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background .2s;
}
.paula-close:hover { background: rgba(255,255,255,.15); }

/* Messages area */
.paula-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 280px; max-height: 360px;
}
.paula-msg {
  max-width: 85%; padding: 10px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.5; word-wrap: break-word;
}
.paula-msg-bot {
  align-self: flex-start;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.9);
  border-bottom-left-radius: 4px;
}
.paula-msg-user {
  align-self: flex-end;
  background: #09a4bd; color: #fff;
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.paula-typing { display: flex; gap: 5px; padding: 12px 18px; }
.paula-typing span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.3);
  animation: paulaBounce .6s infinite alternate;
}
.paula-typing span:nth-child(2) { animation-delay: .2s; }
.paula-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes paulaBounce { to { opacity: 1; transform: translateY(-4px); } }

/* Input area */
.paula-input {
  display: flex; padding: 12px; gap: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.2);
}
.paula-input input {
  flex: 1; border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
  padding: 10px 14px; font-size: 14px;
  background: rgba(255,255,255,.06); color: #fff;
  outline: none; transition: border-color .2s;
}
.paula-input input::placeholder { color: rgba(255,255,255,.35); }
.paula-input input:focus { border-color: #09a4bd; }
.paula-input button {
  background: #09a4bd; border: none; border-radius: 10px;
  width: 42px; cursor: pointer; color: #fff; font-size: 18px;
  transition: background .2s;
}
.paula-input button:hover { background: #0ab8d4; }

/* Scrollbar */
.paula-messages::-webkit-scrollbar { width: 5px; }
.paula-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

/* Mobile */
@media (max-width: 480px) {
  #paula-widget { bottom: 16px; right: 16px; }
  .paula-chat { width: calc(100vw - 32px); bottom: 68px; right: 0; max-height: 70vh; }
}
