/* ==========================================================================
   MAIN NUTRITION - AI SUPPORT AGENT & CONCIERGE WIDGET (NOVA)
   ========================================================================== */

/* Floating Launcher Button */
.back-to-top-btn {
  right: 6.5rem !important;
}

@media (max-width: 768px) {
  .back-to-top-btn {
    right: 5.25rem !important;
  }
}

.support-bot-launcher {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4), 0 0 0 1px rgba(16, 185, 129, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.support-bot-launcher:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 14px 38px rgba(16, 185, 129, 0.55), 0 0 24px rgba(16, 185, 129, 0.6);
}

.support-bot-launcher:active {
  transform: scale(0.96);
}

/* Pulsing radar ring */
.support-bot-launcher::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #10b981;
  opacity: 0.8;
  animation: launcher-pulse 2.8s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  pointer-events: none;
}

@keyframes launcher-pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }
  60% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

/* Unread Badge */
.support-bot-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 4px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #09090b;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
  animation: bounce-badge 1s ease-in-out infinite alternate;
}

@keyframes bounce-badge {
  from { transform: translateY(0); }
  to { transform: translateY(-2px); }
}

/* Proactive Engagement Speech Teaser Bubble */
.support-bot-teaser {
  position: fixed;
  bottom: 6.25rem;
  right: 2rem;
  z-index: 999;
  max-width: 320px;
  background: rgba(18, 20, 29, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 1.15rem;
  padding: 0.85rem 1rem 0.85rem 0.9rem;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  transform-origin: bottom right;
  animation: teaser-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.25s ease;
}

.support-bot-teaser:hover {
  transform: translateY(-3px);
  border-color: #10b981;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(16, 185, 129, 0.25);
}

.support-bot-teaser::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 1.5rem;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(18, 20, 29, 0.95);
}

@keyframes teaser-pop {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.support-bot-teaser-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #064e3b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.support-bot-teaser-text {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #e4e4e7;
}

.support-bot-teaser-text strong {
  color: #10b981;
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.support-bot-teaser-close {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 2px;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.support-bot-teaser-close:hover {
  color: #fafafa;
}

/* Chat Main Window */
.support-bot-window {
  position: fixed;
  bottom: 6.5rem;
  right: 2rem;
  width: 410px;
  height: 620px;
  max-height: calc(100vh - 120px);
  background: rgba(15, 17, 26, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.35rem;
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(16, 185, 129, 0.12);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.support-bot-window.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.92) translateY(18px);
  pointer-events: none;
}

/* Window Header */
.support-bot-header {
  padding: 1rem 1.15rem;
  background: rgba(24, 27, 40, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.support-bot-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.support-bot-avatar {
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.5);
  flex-shrink: 0;
}

.support-bot-status-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #09090b;
  box-shadow: 0 0 8px #10b981;
}

.support-bot-title-group h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fafafa;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.support-bot-cohort-tag {
  font-size: 0.65rem;
  padding: 1.5px 6px;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.support-bot-subtitle {
  font-size: 0.75rem;
  color: #a1a1aa;
  margin: 0;
}

.support-bot-header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.support-bot-btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d4d4d8;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.support-bot-btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Quick Prompt Suggestions Pills */
.support-bot-prompts {
  padding: 0.6rem 0.9rem;
  background: rgba(15, 17, 26, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.support-bot-prompts::-webkit-scrollbar {
  display: none;
}

.support-bot-prompt-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d4d4d8;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.support-bot-prompt-pill:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #10b981;
  transform: translateY(-1px);
}

/* Chat Messages Container */
.support-bot-messages {
  flex: 1;
  padding: 1rem 1.15rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scroll-behavior: smooth;
}

.support-bot-messages::-webkit-scrollbar {
  width: 5px;
}

.support-bot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
}

/* Message Bubbles */
.support-bot-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: msg-appear 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

.support-bot-msg-bubble {
  padding: 0.75rem 0.95rem;
  border-radius: 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

.support-bot-msg.user .support-bot-msg-bubble {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-bottom-right-radius: 0.25rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.support-bot-msg.bot .support-bot-msg-bubble {
  background: rgba(25, 28, 42, 0.8);
  color: #f4f4f5;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 0.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.support-bot-msg-time {
  font-size: 0.68rem;
  color: #71717a;
  margin-top: 3px;
  padding: 0 4px;
}

.support-bot-msg.user .support-bot-msg-time {
  text-align: right;
}

/* Markdown formatting inside bot replies */
.support-bot-msg.bot .support-bot-msg-bubble p {
  margin: 0 0 0.5rem 0;
}
.support-bot-msg.bot .support-bot-msg-bubble p:last-child {
  margin-bottom: 0;
}
.support-bot-msg.bot .support-bot-msg-bubble ul {
  margin: 0.35rem 0 0.5rem 1.25rem;
  padding: 0;
}
.support-bot-msg.bot .support-bot-msg-bubble li {
  margin-bottom: 0.25rem;
}
.support-bot-msg.bot .support-bot-msg-bubble strong {
  color: #34d399;
}

/* Typing indicator */
.support-bot-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.65rem 0.85rem;
  background: rgba(25, 28, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  border-bottom-left-radius: 0.25rem;
  width: fit-content;
}

.support-bot-typing-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: typing-wave 1.3s infinite ease-in-out;
}

.support-bot-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.support-bot-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-wave {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* Interactive Action Cards */
.support-bot-card {
  margin-top: 0.65rem;
  background: rgba(12, 14, 21, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 0.85rem;
  padding: 0.85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.support-bot-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.support-bot-card-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fafafa;
  margin-bottom: 0.4rem;
}

.support-bot-card-price span {
  font-size: 0.72rem;
  color: #a1a1aa;
  font-weight: 400;
}

.support-bot-card-features {
  font-size: 0.76rem;
  color: #d4d4d8;
  line-height: 1.4;
  margin-bottom: 0.65rem;
  padding-left: 1rem;
}

.support-bot-card-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #10b981;
  color: #09090b;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.55rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.support-bot-card-btn:hover {
  background: #34d399;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* Action Chips */
.support-bot-action-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.support-bot-action-chip {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.32rem 0.7rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
}

.support-bot-action-chip:hover {
  background: #10b981;
  color: #09090b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Input Bar */
.support-bot-footer {
  padding: 0.75rem 0.95rem;
  background: rgba(20, 23, 34, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.support-bot-input-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(11, 13, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  padding: 0.35rem 0.5rem 0.35rem 0.85rem;
  transition: border-color 0.2s ease;
}

.support-bot-input-form:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.support-bot-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fafafa;
  font-size: 0.85rem;
  outline: none;
  font-style: italic;
  font-family: inherit;
}

.support-bot-input::placeholder {
  color: #71717a;
  font-style: italic;
}

.support-bot-send-btn {
  background: #10b981;
  color: #09090b;
  border: none;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.support-bot-send-btn:hover:not(:disabled) {
  background: #34d399;
  transform: scale(1.05);
}

.support-bot-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Highlight pulse effect when navigating to section */
.section-agent-highlight {
  animation: section-pulse 2.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes section-pulse {
  0% {
    outline: 3px solid #10b981;
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.6);
  }
  100% {
    outline: 3px solid transparent;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ==========================================================================
   MOBILE RESPONSIVE LAYOUT (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .support-bot-launcher {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 3.35rem;
    height: 3.35rem;
  }

  .support-bot-teaser {
    bottom: 5.25rem;
    right: 1.25rem;
    left: 1.25rem;
    max-width: calc(100vw - 2.5rem);
  }

  .support-bot-teaser::after {
    right: 2rem;
  }

  .support-bot-window {
    position: fixed;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 86vh;
    max-height: 86vh;
    border-radius: 1.5rem 1.5rem 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  }

  /* Drawer pull handle for mobile */
  .support-bot-drawer-handle {
    display: block;
    width: 38px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    margin: 6px auto 2px;
  }

  .support-bot-header {
    padding: 0.65rem 1rem 0.85rem;
  }

  .support-bot-footer {
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
  }
}

@media (min-width: 769px) {
  .support-bot-drawer-handle {
    display: none;
  }
}

/* ==========================================================================
   S.T.A.L.K.E.R. SKIN OVERRIDES
   ========================================================================== */
body.skin-stalker .support-bot-launcher {
  background: #000000 !important;
  color: #4ade80 !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.5) !important;
  font-family: 'VT323', monospace !important;
}

body.skin-stalker .support-bot-launcher::before {
  border-color: #4ade80 !important;
}

body.skin-stalker .support-bot-teaser,
body.skin-stalker .support-bot-window {
  background: #000000 !important;
  border-color: #4ade80 !important;
  color: #4ade80 !important;
  font-family: 'VT323', monospace !important;
  box-shadow: 0 0 30px rgba(74, 222, 128, 0.3) !important;
}

body.skin-stalker .support-bot-header,
body.skin-stalker .support-bot-footer {
  background: #051008 !important;
  border-color: #22c55e !important;
}

body.skin-stalker .support-bot-title-group h3,
body.skin-stalker .support-bot-subtitle,
body.skin-stalker .support-bot-msg.bot .support-bot-msg-bubble,
body.skin-stalker .support-bot-input {
  color: #4ade80 !important;
  font-family: 'VT323', monospace !important;
  font-size: 1.15rem !important;
  letter-spacing: 0.04em;
}

body.skin-stalker .support-bot-cohort-tag {
  background: rgba(74, 222, 128, 0.2) !important;
  color: #4ade80 !important;
  border-color: #4ade80 !important;
}

body.skin-stalker .support-bot-send-btn,
body.skin-stalker .support-bot-card-btn {
  background: #4ade80 !important;
  color: #000000 !important;
  font-family: 'VT323', monospace !important;
  font-size: 1.1rem !important;
  font-weight: 700;
}
