/* ==========================================================================
   Floating Orbital Chatbot Widget & Window
   ========================================================================== */

#floating-chat-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: 'Manrope', sans-serif;
}

/* Floating Trigger Bubble */
.orbital-chat-bubble-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #028038 0%, #004D23 100%);
  color: #ffffff;
  padding: 0.6rem 1.1rem;
  border-radius: 99px;
  box-shadow: 0 12px 32px -4px rgba(2, 128, 56, 0.45);
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  transition: all 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
}

.orbital-chat-bubble-btn:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 18px 40px -4px rgba(2, 128, 56, 0.55);
}

.orbital-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #58D054;
  color: #01351E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  position: relative;
}

.orbital-ia-tag {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #C8102E;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 99px;
  border: 1.5px solid #ffffff;
}

/* Floating Window Popup */
#floating-chat-window {
  width: 380px;
  max-width: calc(100vw - 2rem);
  height: 540px;
  max-height: calc(100vh - 6rem);
  background: #ffffff;
  border-radius: 1.75rem; /* 28px bordes redonditos */
  box-shadow: 0 24px 60px -10px rgba(1, 45, 29, 0.38), 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 0.75rem;
  transition: all 350ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: bottom right;
}

#floating-chat-window.chat-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.85) translateY(20px);
}

/* Header */
.floating-chat-header {
  background: linear-gradient(135deg, #013B27 0%, #012D1D 100%);
  color: #ffffff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.floating-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #F8FAFC;
}

.chat-bubble-msg {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 1.25rem;
  font-size: 0.82rem;
  line-height: 1.5;
  animation: fadeIn 250ms ease;
}

.chat-bubble-bot {
  background: #ffffff;
  color: #0F172A;
  align-self: flex-start;
  border-bottom-left-radius: 0.25rem;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.chat-bubble-user {
  background: #028038;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 0.25rem;
  box-shadow: 0 2px 6px rgba(2, 128, 56, 0.25);
}

/* Chips */
.floating-chat-chips {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  overflow-x: auto;
  background: #ffffff;
  border-top: 1px solid #F1F5F9;
  scrollbar-width: none;
}

.floating-chat-chips::-webkit-scrollbar {
  display: none;
}

.floating-chip-btn {
  background: #EAFCE8;
  color: #166534;
  border: 1px solid #BBF7D0;
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 200ms ease;
}

.floating-chip-btn:hover {
  background: #DCFCE7;
  border-color: #58D054;
  transform: translateY(-1px);
}

/* Input Bar */
.floating-chat-input-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-top: 1px solid #E2E8F0;
}

.floating-chat-input-bar input {
  flex: 1;
  font-size: 0.82rem;
  padding: 0.6rem 0.9rem;
  border-radius: 99px;
  border: 1.5px solid #CBD5E1;
  outline: none;
  transition: border-color 200ms ease;
}

.floating-chat-input-bar input:focus {
  border-color: #028038;
}

.floating-chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #028038;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 200ms ease;
}

.floating-chat-send-btn:hover {
  background: #014D23;
  transform: scale(1.08);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}