/* ============================================
   RESPONSIBLE.FIT AI COACH CHATBOT STYLES
   Glassmorphic design matching site theme
   ============================================ */

:root {
  --fire-red: #FF0033;
  --ember-red: #DC0000;
  --blood-red: #8B0000;
  --obsidian: #0a0a0a;
  --void: #141414;
  --carbon: #1a1a1a;
  --steel: #2d2d2d;
  --iron: #3a3a3a;
  --silver: #8e8e8e;
  --mercury: #b0b0b0;
  --pearl: #e8e8e8;
  --white: #FFFFFF;
  --gradient-fire: linear-gradient(135deg, #FF0033 0%, #DC0000 50%, #8B0000 100%);
  --glow-red: 0 8px 32px rgba(255, 0, 51, 0.4);
  --glow-red-intense: 0 0 60px rgba(255, 0, 51, 0.6);
  --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.3);
  --ease-smooth: cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* ============================================
   FLOATING CHAT BUBBLE
   ============================================ */

.chat-bubble-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
}

.chat-bubble {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.chat-bubble::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  z-index: -2;
  filter: blur(10px);
  transform: rotate(0deg);
  transition: transform 1.5s ease-in-out;
}

.chat-bubble::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--obsidian);
  border-radius: 50%;
  z-index: -1;
  filter: blur(5px);
}

.chat-bubble:hover {
  transform: scale(1.1) translateY(-5px);
}

.chat-bubble:hover::before {
  transform: rotate(180deg);
}

.chat-bubble i {
  font-size: 2rem;
  color: var(--white);
  z-index: 1;
}

/* Pulsing animation */
.pulse-ring {
  position: absolute;
  width: 70px;
  height: 70px;
  border: 3px solid;
  border-image: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  ) 1;
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite, pulse-rotate 4s linear infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes pulse-rotate {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}

/* Notification badge */
.chat-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: transparent;
  color: var(--white);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  animation: bounce 0.5s ease infinite alternate;
  position: relative;
  overflow: hidden;
}

.chat-badge::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  z-index: -2;
  filter: blur(6px);
  animation: rotate-gradient 3s linear infinite;
}

.chat-badge::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: rgba(10, 10, 10, 0.9);
  border-radius: 50%;
  z-index: -1;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-3px); }
}

/* ============================================
   FLOATING CHAT WINDOW
   ============================================ */

.chat-window {
  position: fixed;
  bottom: 120px;
  right: 30px;
  width: 400px;
  max-width: calc(100vw - 60px);
  height: 600px;
  max-height: calc(100vh - 150px);
  background: transparent;
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  z-index: 9998;
  transition: all 0.3s var(--ease-smooth);
}

.chat-window::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  z-index: -2;
  filter: blur(12px);
  transform: rotate(0deg);
  animation: rotate-gradient 10s linear infinite;
}

.chat-window::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: rgba(10, 10, 10, 0.95);
  border-radius: 21px;
  z-index: -1;
}

.chat-window.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

/* ============================================
   CHAT HEADER
   ============================================ */

.chat-header {
  background: transparent;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.chat-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  z-index: -2;
  filter: blur(15px);
  transform: rotate(0deg);
  animation: rotate-gradient 8s linear infinite;
}

.chat-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--obsidian);
  z-index: -1;
  opacity: 0.85;
}

@keyframes rotate-gradient {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 1;
}

.chat-title span {
  color: transparent;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  background-clip: text;
  -webkit-background-clip: text;
  filter: hue-rotate(0deg);
  animation: hue-rotating-text 6s linear infinite;
}

@keyframes hue-rotating-text {
  to { filter: hue-rotate(360deg); }
}

.chat-title i {
  font-size: 1.5rem;
  color: transparent;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  background-clip: text;
  -webkit-background-clip: text;
  filter: hue-rotate(0deg);
  animation: hue-rotating-icon 4s linear infinite;
}

@keyframes hue-rotating-icon {
  to { filter: hue-rotate(360deg); }
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  z-index: 1;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00ff00;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.chat-close-btn {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 1;
  position: relative;
  overflow: hidden;
}

.chat-close-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  z-index: -2;
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s, transform 1.5s ease-in-out;
}

.chat-close-btn::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: -1;
  transition: background 0.3s;
}

.chat-close-btn i {
  color: var(--white);
  font-size: 1rem;
  z-index: 1;
  transition: transform 0.3s;
}

.chat-close-btn:hover::before {
  opacity: 1;
  transform: rotate(180deg);
}

.chat-close-btn:hover::after {
  background: rgba(10, 10, 10, 0.8);
}

.chat-close-btn:hover i {
  transform: rotate(90deg);
}

/* ============================================
   CHAT MESSAGES
   ============================================ */

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(10, 10, 10, 0.5);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--fire-red);
  border-radius: 3px;
}

.message {
  display: flex;
  gap: 0.75rem;
  animation: slideIn 0.3s var(--ease-smooth);
  max-width: 85%;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.bot-message .message-avatar {
  background: transparent;
  position: relative;
  overflow: hidden;
}

.bot-message .message-avatar::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  z-index: -2;
  filter: blur(8px);
  animation: rotate-gradient 5s linear infinite;
}

.bot-message .message-avatar::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: rgba(10, 10, 10, 0.9);
  border-radius: 50%;
  z-index: -1;
}

.user-message .message-avatar {
  background: transparent;
  position: relative;
  overflow: hidden;
}

.user-message .message-avatar::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  z-index: -2;
  filter: blur(8px);
  animation: rotate-gradient 5s linear infinite;
}

.user-message .message-avatar::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: rgba(10, 10, 10, 0.9);
  border-radius: 50%;
  z-index: -1;
}

.message-content {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--pearl);
  line-height: 1.6;
  font-size: 0.95rem;
}

.user-message .message-content {
  background: transparent;
  color: var(--white);
  border: none;
  position: relative;
  overflow: hidden;
}

.user-message .message-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  z-index: -2;
  filter: blur(10px);
  animation: rotate-gradient 6s linear infinite;
}

.user-message .message-content::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: rgba(10, 10, 10, 0.85);
  border-radius: 14px;
  z-index: -1;
}

.message-time {
  font-size: 0.7rem;
  color: var(--silver);
  margin-top: 0.25rem;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 0.4rem;
  padding: 1rem;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--fire-red);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-10px); opacity: 1; }
}

/* ============================================
   QUICK PROMPTS
   ============================================ */

.quick-prompts {
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: rgba(10, 10, 10, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}

.quick-prompts::-webkit-scrollbar {
  height: 4px;
}

.quick-prompts::-webkit-scrollbar-thumb {
  background: var(--fire-red);
  border-radius: 2px;
}

.quick-prompt-btn {
  padding: 0.5rem 1rem;
  background: rgba(10, 10, 10, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--pearl);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.quick-prompt-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}

.quick-prompt-btn:hover {
  background: rgba(10, 10, 10, 0.8);
  border-color: transparent;
  color: var(--white);
  transform: translateY(-2px);
}

.quick-prompt-btn:hover::before {
  opacity: 1;
}

/* ============================================
   CHAT INPUT
   ============================================ */

.chat-input-container {
  padding: 1rem;
  background: rgba(26, 26, 26, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.chat-input {
  flex: 1;
  background: rgba(10, 10, 10, 0.8);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 0.875rem 1rem;
  color: var(--white);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
  outline: none;
  position: relative;
  background-clip: padding-box;
}

.chat-input::placeholder {
  color: var(--silver);
}

.chat-input:focus {
  background: rgba(10, 10, 10, 0.9);
  border-image: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  ) 1;
  animation: input-glow 3s linear infinite;
}

@keyframes input-glow {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.chat-send-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #ff6b6b
  );
  z-index: -2;
  filter: blur(8px);
  transform: rotate(0deg);
  transition: transform 1.5s ease-in-out;
  animation: rotate-gradient 4s linear infinite;
}

.chat-send-btn::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--obsidian);
  border-radius: 10px;
  z-index: -1;
}

.chat-send-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.05);
}

.chat-send-btn:hover:not(:disabled)::before {
  transform: rotate(180deg);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-send-btn i {
  color: var(--white);
  font-size: 1.1rem;
  z-index: 1;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .chat-bubble-container {
    bottom: 20px;
    right: 20px;
  }

  .chat-bubble {
    width: 60px;
    height: 60px;
  }

  .chat-bubble i {
    font-size: 1.75rem;
  }

  .pulse-ring {
    width: 60px;
    height: 60px;
  }

  .chat-window {
    bottom: 100px;
    right: 20px;
    width: calc(100vw - 40px);
    height: calc(100vh - 150px);
    border-radius: 20px;
  }

  .chat-header {
    padding: 1rem;
  }

  .chat-title {
    font-size: 1rem;
  }

  .chat-messages {
    padding: 1rem;
  }

  .message {
    max-width: 90%;
  }

  .quick-prompts {
    padding: 0.75rem;
  }

  .quick-prompt-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .chat-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .chat-bubble-container {
    bottom: 15px;
    right: 15px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.3s var(--ease-smooth);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

