.nia-answer-actions { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .4rem; }

/* ==========================================================================
   WIDGETS & FLOATING ACTION STYLES (WHATSAPP & NIA ASISTENTE IA)
   ISTCGE ASCEND
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FLOATING WHATSAPP BUTTON (LOWER LEFT)
   -------------------------------------------------------------------------- */
.whatsapp-float-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(4, 25, 20, 0.95);
  border: 1.5px solid rgba(76, 226, 141, 0.6);
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 15px rgba(37, 211, 102, 0.2);
  color: #FFFFFF;
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.whatsapp-float-btn:hover {
  transform: translateY(-3px) scale(1.02);
  background: #0D3328;
  border-color: #25D366;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45), 0 0 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.whatsapp-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.whatsapp-text-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
}

.whatsapp-text-sub {
  font-size: 0.72rem;
  color: #A7F3D0;
}

/* --------------------------------------------------------------------------
   2. FLOATING NIA CHATBOT LAUNCHER (LOWER RIGHT)
   -------------------------------------------------------------------------- */
.nia-launcher-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nia-launcher-wrap.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85) translateY(15px);
}

.nia-launcher-pill {
  background: linear-gradient(135deg, rgba(8, 28, 76, 0.95) 0%, rgba(3, 12, 34, 0.98) 100%);
  border: 1.5px solid #00D2FF;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4), 0 0 15px rgba(0, 210, 255, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nia-launcher-pill:hover {
  transform: translateY(-2px);
  border-color: #5CE1E6;
  box-shadow: 0 8px 25px rgba(0, 102, 255, 0.6), 0 0 20px rgba(0, 210, 255, 0.5);
}

.nia-pill-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10B981;
}

.nia-launcher-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #030D22;
  border: 2px solid #00D2FF;
  box-shadow: 0 8px 25px rgba(0, 102, 255, 0.5), 0 0 20px rgba(0, 210, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.nia-launcher-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 102, 255, 0.7), 0 0 25px rgba(0, 210, 255, 0.6);
  border-color: #5CE1E6;
}

.nia-launcher-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nia-online-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background: #10B981;
  border: 2px solid #030818;
  border-radius: 50%;
  box-shadow: 0 0 6px #10B981;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   3. CHATBOT WRAPPER & LATERAL MASCOT MASK
   -------------------------------------------------------------------------- */
.nia-chat-wrapper {
  position: fixed;
  bottom: 24px;
  right: 55px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(0.96);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nia-chat-wrapper.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Lateral Mascot: NIA Señalando framing the chat */
/* NIA points horizontally to the left over the chat header,
   and the entire chat modal is nested directly under her arm and armpit */
.nia-mascot-lateral {
  position: absolute;
  top: -165px;
  right: -110px;
  width: 480px;
  height: 480px;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 25px rgba(0, 210, 255, 0.4));
  animation: niaLateralFloat 4.5s ease-in-out infinite alternate;
}

@keyframes niaLateralFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(0.4deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.nia-mascot-lateral .nia-mascot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Chat Modal Window */
.nia-chat-modal {
  position: relative;
  width: 390px;
  height: 600px;
  max-height: calc(100vh - 100px);
  background: #071536;
  border: 1.5px solid rgba(0, 210, 255, 0.35);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 210, 255, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

.nia-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: linear-gradient(90deg, #071946 0%, #030C28 100%);
  border-bottom: 1px solid rgba(0, 210, 255, 0.25);
  position: relative;
  z-index: 12;
}

.nia-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Official Avatar: nia_agent_face.jpg */
.nia-header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #00D2FF;
  overflow: hidden;
  background: #030E26;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
  flex-shrink: 0;
}

.nia-header-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nia-header-title {
  font-family: var(--font-display, 'Exo 2', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nia-badge-ia {
  background: linear-gradient(135deg, #00D2FF 0%, #0066FF 100%);
  color: #FFFFFF;
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-weight: 900;
}

.nia-header-status {
  font-size: 0.72rem;
  color: #38BDF8;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nia-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nia-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nia-action-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  border-color: #00D2FF;
}

.nia-action-btn.close:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: #EF4444;
}

/* Native Chat Body & Messages */
.nia-chat-body {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background: #061129;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nia-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scroll-behavior: smooth;
}

.nia-messages-container::-webkit-scrollbar {
  width: 5px;
}
.nia-messages-container::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 255, 0.25);
  border-radius: 10px;
}

.nia-msg {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  animation: niaMsgFadeIn 0.25s ease-out forwards;
}

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

.nia-msg-bot {
  align-self: flex-start;
}

.nia-msg-user {
  align-self: flex-end;
}

.nia-msg-bot .nia-bubble {
  background: #0B1E48;
  border: 1px solid rgba(0, 210, 255, 0.2);
  color: #F1F5F9;
  border-radius: 16px 16px 16px 4px;
  padding: 0.95rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nia-msg-bot .nia-bubble strong {
  color: #00D2FF;
}

.nia-msg-user .nia-bubble {
  background: linear-gradient(135deg, #1E50D8 0%, #00D2FF 100%);
  color: #FFFFFF;
  border-radius: 16px 16px 4px 16px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.3);
}

/* Quick Queries Section */
.nia-quick-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.nia-quick-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94A3B8;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.nia-quick-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nia-quick-btn {
  background: #0B1938;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  color: #E2E8F0;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.nia-quick-btn:hover {
  background: #11285E;
  border-color: #00D2FF;
  color: #FFFFFF;
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(0, 210, 255, 0.15);
}

.nia-action-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
  margin-right: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: #F7C948;
  color: #030A1A;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.nia-action-inline-btn:hover {
  background: #FFE082;
  transform: translateY(-1px);
}

/* Typing Indicator */
.nia-typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.6rem 0.9rem;
  background: #0B1E48;
  border-radius: 12px;
  width: fit-content;
  border: 1px solid rgba(0, 210, 255, 0.2);
}

.nia-typing-indicator span {
  width: 6px;
  height: 6px;
  background: #00D2FF;
  border-radius: 50%;
  animation: niaTypingBounce 1.2s infinite ease-in-out;
}
.nia-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.nia-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes niaTypingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* Input Area at Bottom (Image 3) */
.nia-chat-input-bar {
  padding: 0.75rem 1rem 0.9rem;
  background: #040D20;
  border-top: 1px solid rgba(0, 210, 255, 0.2);
}

.nia-input-wrapper {
  position: relative;
  background: #071536;
  border: 1.5px solid rgba(0, 210, 255, 0.25);
  border-radius: 14px;
  padding: 0.65rem 0.85rem 2.2rem;
  transition: all 0.25s ease;
}

.nia-input-wrapper:focus-within {
  border-color: #00D2FF;
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.25);
}

.nia-input-wrapper textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
  resize: none;
  max-height: 80px;
}

.nia-input-wrapper textarea::placeholder {
  color: #64748B;
}

.nia-send-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #112658;
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.nia-send-btn:hover {
  background: #00D2FF;
  color: #030A1A;
  border-color: #00D2FF;
}

/* --------------------------------------------------------------------------
   4. OPTIMAL MOBILE RESPONSIVE BEHAVIOR (max-width: 600px)
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .whatsapp-float-btn {
    bottom: 16px;
    left: 16px;
    padding: 6px 12px 6px 6px;
  }
  .whatsapp-text-sub {
    display: none;
  }
  .whatsapp-icon-circle {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .nia-launcher-wrap {
    bottom: 16px;
    right: 16px;
  }
  .nia-launcher-pill {
    display: none;
  }
  .nia-launcher-btn {
    width: 58px;
    height: 58px;
  }

  /* Bottom sheet modal presentation on mobile */
  .nia-chat-wrapper {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100vw;
    height: 88vh;
    max-height: 88vh;
    align-items: center;
  }

  .nia-chat-modal {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
  }

  /* Nia peeks over the mobile sheet */
  .nia-mascot-lateral {
    top: -65px;
    right: 10px;
    width: 175px;
    height: 175px;
  }
}
