/* ==========================================================================
   Kaydeva Multilingual Chatbot - Ultra-Luxury Glassmorphic UI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --primary: #6366f1;
  --primary-rgb: 99, 102, 241;
  --primary-light: #818cf8;
  --secondary: #a855f7;
  --secondary-rgb: 168, 85, 247;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;

  /* Background mesh gradients */
  --bg-deep: #070714;
  --bg-gradient-1: #0a0a23;
  --bg-gradient-2: #160f30;
  --bg-gradient-3: #0d1e38;

  /* Glassmorphism Tokens */
  --glass-card-bg: rgba(13, 15, 33, 0.65);
  --glass-card-border: rgba(255, 255, 255, 0.12);
  --glass-card-border-top: rgba(255, 255, 255, 0.25);
  --glass-inner-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);

  /* Message Glass Tokens */
  --bot-msg-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
  --bot-msg-border: rgba(255, 255, 255, 0.16);
  --bot-msg-border-top: rgba(255, 255, 255, 0.32);

  --user-msg-bg: linear-gradient(135deg, rgba(99, 102, 241, 0.55) 0%, rgba(168, 85, 247, 0.42) 100%);
  --user-msg-border: rgba(255, 255, 255, 0.28);
  --user-msg-border-top: rgba(255, 255, 255, 0.5);

  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Emotion Accents */
  --accent-angry: #f87171;
  --accent-happy: #34d399;
  --accent-urgent: #fbbf24;
  --accent-escalation: #f59e0b;

  /* Shadows */
  --shadow-lux: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 50px -10px rgba(99, 102, 241, 0.18);
  --shadow-glow-btn: 0 6px 20px rgba(99, 102, 241, 0.45);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   Cinematic Animated Background
   ========================================================================== */

.bg-wrapper {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(168, 85, 247, 0.28) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.2) 0%, transparent 55%),
    linear-gradient(145deg, #070714 0%, #0d0e26 50%, #150e2e 100%);
  background-size: 100% 100%;
}

/* Ambient animated glowing aurora orbs */
.bg-wrapper::before,
.bg-wrapper::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.65;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.bg-wrapper::before {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.45), rgba(168, 85, 247, 0.15));
  top: -10%;
  left: 20%;
  animation-duration: 20s;
}

.bg-wrapper::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.35), rgba(6, 182, 212, 0.15));
  bottom: -15%;
  right: 15%;
  animation-duration: 24s;
  animation-delay: -7s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(40px, 60px) scale(1.12);
  }

  100% {
    transform: translate(-30px, 30px) scale(0.95);
  }
}

#bgVideo {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.25;
  mix-blend-mode: screen;
  filter: brightness(0.6) contrast(1.2);
}

#particleCanvas,
#glowCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#particleCanvas {
  opacity: 0.75;
}

#glowCanvas {
  pointer-events: none;
  opacity: 0.5;
}

/* ==========================================================================
   Root Layout & Chat Card
   ========================================================================== */

#root {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  padding: 16px;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-card {
  position: relative;
  width: 100%;
  height: 92vh;
  max-height: 840px;
  min-height: 580px;
  background: var(--glass-card-bg);
  border: 1px solid var(--glass-card-border);
  border-top: 1px solid var(--glass-card-border-top);
  border-radius: 28px;
  backdrop-filter: blur(35px) saturate(190%);
  -webkit-backdrop-filter: blur(35px) saturate(190%);
  box-shadow: var(--shadow-lux), var(--glass-inner-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cardEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(35px) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   Chat Header
   ========================================================================== */

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 5;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.logo span {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.logo span::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: logoShine 4s infinite ease-in-out;
}

@keyframes logoShine {

  0%,
  80% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

.header-status {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 8px #34d399;
  animation: liveDot 2s infinite ease-in-out;
}

@keyframes liveDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

.status-text {
  font-family: 'Outfit', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

/* ==========================================================================
   Messages Area & Glass Bubbles
   ========================================================================== */

.messages {
  flex: 1;
  padding: 22px 18px;
  overflow-y: auto;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  gap: 12px;
  direction: ltr;
  position: relative;
}

/* Friendly Background Placeholder / Watermark */
.chat-placeholder {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
  pointer-events: none;
  user-select: none;
  opacity: 0.42;
  transition: opacity 0.3s ease;
  max-width: 320px;
}

.placeholder-icon {
  font-size: 32px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
  animation: gentlePulse 3s ease-in-out infinite alternate;
}

@keyframes gentlePulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  100% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.placeholder-title {
  font-family: 'Outfit', sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.2px;
  line-height: 1.45;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.placeholder-sub {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Luxury Glass Scrollbar */
.messages::-webkit-scrollbar {
  width: 5px;
}

.messages::-webkit-scrollbar-track {
  background: transparent;
}

.messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  backdrop-filter: blur(5px);
}

.messages::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.4);
}

/* Message base */
.message {
  max-width: 84%;
  padding: 13px 18px;
  font-size: 14.5px;
  line-height: 1.55;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--text-primary);
  letter-spacing: 0.1px;
}

/* Bot Message - Frosted Liquid Glass */
.message.bot {
  margin-right: auto;
  margin-left: 0;
  background: var(--bot-msg-bg);
  border: 1px solid var(--bot-msg-border);
  border-top: 1px solid var(--bot-msg-border-top);
  border-radius: 22px 22px 22px 6px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow:
    0 12px 28px -6px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
  animation: botMessagePop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* User Message - Radiant Amethyst Glass */
.message.user {
  margin-left: auto;
  margin-right: 0;
  background: var(--user-msg-bg);
  border: 1px solid var(--user-msg-border);
  border-top: 1px solid var(--user-msg-border-top);
  border-radius: 22px 22px 6px 22px;
  backdrop-filter: blur(18px) saturate(200%);
  -webkit-backdrop-filter: blur(18px) saturate(200%);
  box-shadow:
    0 12px 28px -6px rgba(99, 102, 241, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
  color: #ffffff;
  animation: userMessagePop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes botMessagePop {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes userMessagePop {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Emotion-adapted Accents with Glass Glows */
.message.bot.angry {
  border-color: rgba(248, 113, 113, 0.45);
  border-top-color: rgba(248, 113, 113, 0.7);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(185, 28, 28, 0.12) 100%);
  box-shadow: 0 12px 28px -6px rgba(239, 68, 68, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.message.user.angry {
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 12px 28px -6px rgba(239, 68, 68, 0.4);
}

.message.bot.happy {
  border-color: rgba(52, 211, 153, 0.45);
  border-top-color: rgba(52, 211, 153, 0.7);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.12) 100%);
  box-shadow: 0 12px 28px -6px rgba(16, 185, 129, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.message.user.happy {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 12px 28px -6px rgba(16, 185, 129, 0.4);
}

.message.bot.urgent {
  border-color: rgba(251, 191, 36, 0.45);
  border-top-color: rgba(251, 191, 36, 0.7);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.12) 100%);
  box-shadow: 0 12px 28px -6px rgba(245, 158, 11, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.message.bot.escalated {
  border-color: rgba(245, 158, 11, 0.5);
  border-top-color: rgba(251, 191, 36, 0.8);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(180, 83, 9, 0.15) 100%);
  box-shadow: 0 12px 28px -6px rgba(245, 158, 11, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   Typing Indicator
   ========================================================================== */

.typing-indicator {
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 4px 0 8px 18px;
  width: fit-content;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  animation: typingFadeIn 0.3s ease forwards;
}

@keyframes typingFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.6);
  animation: typingBounce 1.3s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.18s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-7px) scale(1.15);
    opacity: 1;
  }
}

/* ==========================================================================
   Quick Suggestion Chips
   ========================================================================== */

.suggestions {
  padding: 8px 18px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
  animation: suggestionsIn 0.4s ease forwards;
}

@keyframes suggestionsIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestion-chip {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  user-select: none;
}

.suggestion-chip:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.2));
  border-color: rgba(168, 85, 247, 0.45);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.3);
}

.suggestion-chip:active {
  transform: translateY(0) scale(0.97);
}

/* ==========================================================================
   Input Bar & Send Button
   ========================================================================== */

.input-area {
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(15, 17, 35, 0.4) 0%, rgba(8, 9, 20, 0.75) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 10;
}

.input-area input {
  flex: 1;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.input-area input::placeholder {
  color: var(--text-muted);
}

.input-area input:focus {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(255, 255, 255, 0.09);
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.25),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Send Button - Premium Glowing Gradient Action */
.input-area button {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-glow-btn), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
  z-index: 2;
  user-select: none;
}

.input-area button svg {
  pointer-events: none;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.input-area button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  filter: brightness(1.1);
}

.input-area button:hover svg {
  transform: translateX(1px) translateY(-1px);
}

.input-area button:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   End Chat Button
   ========================================================================== */

.end-chat-btn {
  padding: 11px 20px;
  margin: 8px 18px 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.end-chat-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

.end-chat-btn:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================================================
   Rating Modal - Luxury Frosted Glass
   ========================================================================== */

.rating-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 15, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalOverlayFade 0.3s ease forwards;
}

.rating-modal[hidden] {
  display: none !important;
}

@keyframes modalOverlayFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.rating-modal-content {
  background: rgba(18, 20, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 26px;
  padding: 32px 28px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  animation: modalScaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rating-modal-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}

.rating-modal-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.star-rating {
  font-size: 36px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.star-rating span {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  color: #475569;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.star-rating span:hover {
  transform: scale(1.25) translateY(-2px);
  color: #fbbf24;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6));
}

.rating-modal-content textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  margin-bottom: 24px;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease;
}

.rating-modal-content textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-cancel,
.btn-submit {
  padding: 11px 22px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-submit {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-submit:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.55);
}

/* ==========================================================================
   RTL Mode & Responsive
   ========================================================================== */

html.ar-mode .messages {
  direction: rtl;
}

html.ar-mode .message.user {
  margin-left: 0;
  margin-right: auto;
  border-radius: 22px 22px 22px 6px;
}

html.ar-mode .message.bot {
  margin-right: 0;
  margin-left: auto;
  border-radius: 22px 22px 6px 22px;
}

input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  #root {
    padding: 0;
  }

  .chat-card {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
}