/* ===== CSS VARIABLES ===== */
:root {
  /* Primary Brand Colors */
  --primary-color: #e53e3e;
  --primary-hover: #c53030;
  --primary-light: #feb2b2;
  --primary-dark: #9b2c2c;

  /* Secondary Colors */
  --secondary-color: #718096;
  --secondary-light: #a0aec0;
  --secondary-dark: #4a5568;

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --gray-900: #171923;

  /* Brand Specific Colors */
  --whatsapp-color: #25d366;
  --whatsapp-hover: #128c7e;
  --whatsapp-light: #dcf8c6;

  --telegram-color: #0088cc;
  --telegram-hover: #005580;
  --telegram-light: #b3d9f2;

  --messenger-color: #006aff;
  --messenger-hover: #004494;
  --messenger-light: #b3d1ff;

  --ai-color: #667eea;
  --ai-hover: #5a67d8;
  --ai-light: #c3dafe;

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
  --shadow-lg: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  --shadow-xl: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);

  /* Brand Shadows */
  --shadow-primary: 0 4px 15px rgba(229, 62, 62, 0.4);
  --shadow-ai: 0 4px 15px rgba(102, 126, 234, 0.3);
  --shadow-whatsapp: 0 4px 15px rgba(37, 211, 102, 0.3);
  --shadow-telegram: 0 4px 15px rgba(0, 136, 204, 0.3);
  --shadow-messenger: 0 4px 15px rgba(0, 106, 255, 0.3);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Typography */
  --font-family: "Segoe UI", "Noto Sans Bengali", Tahoma, Geneva, Verdana, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
}

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: var(--shadow-primary);
  }
  50% {
    box-shadow: var(--shadow-primary), 0 0 30px rgba(229, 62, 62, 0.6);
  }
}

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

@keyframes statusBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* ===== BASE STYLES ===== */
* {
  box-sizing: border-box;
}

/* ===== FAB WIDGET CONTAINER ===== */
.fab-widget-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: var(--font-family);
}

.fab-default,
.fab-options {
  position: absolute;
  bottom: 0;
  right: 0;
}

/* ===== MAIN FAB BUTTON ===== */
.fab-main-button {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  animation: bounce 2s infinite;
}

.fab-main-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left var(--transition-slow);
}

.fab-main-button:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-lg), var(--shadow-primary);
  animation: glow 2s infinite;
}

.fab-main-button:hover::before {
  left: 100%;
}

.fab-button-content {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  color: var(--white);
  gap: 12px;
}

.fab-help-text {
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.fab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== FAB OPTIONS ===== */
.fab-options {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  transform: scale(0) translateY(20px);
  transform-origin: bottom right;
  transition: all var(--transition-bounce);
  opacity: 0;
  pointer-events: none;
  margin-bottom: 90px;
}

.fab-widget-container.active .fab-main-button {
  transform: scale(0.9);
  opacity: 0.8;
  animation: none;
}

.fab-widget-container.active .fab-options {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.fab-option {
  background: var(--white);
  border-radius: var(--radius-xl);
  color: var(--gray-700);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  text-decoration: none;
  overflow: hidden;
  position: relative;
  min-width: 170px;
  border: 2px solid transparent;
  backdrop-filter: blur(10px);
}

.fab-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: -200px;
  width: 200px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: left var(--transition-slow);
}

.fab-option:hover::before {
  left: 100%;
}

.option-content {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.option-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-normal);
}

.option-text {
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  letter-spacing: 0.3px;
  flex: 1;
}

.fab-option:hover {
  transform: translateX(-10px) scale(1.05);
  box-shadow: var(--shadow-lg);
}

.fab-option:hover .option-icon {
  transform: scale(1.2) rotate(5deg);
}

/* ===== BRAND SPECIFIC STYLES ===== */
.fab-option.ai-chat-button {
  border-color: var(--ai-color);
  background: linear-gradient(135deg, var(--white) 0%, var(--ai-light) 100%);
}

.fab-option.ai-chat-button:hover {
  background: linear-gradient(135deg, var(--ai-color) 0%, var(--ai-hover) 100%);
  color: var(--white);
  box-shadow: var(--shadow-lg), var(--shadow-ai);
}

.fab-option.whatsapp {
  border-color: var(--whatsapp-color);
  background: linear-gradient(135deg, var(--white) 0%, var(--whatsapp-light) 100%);
}

.fab-option.whatsapp:hover {
  background: linear-gradient(135deg, var(--whatsapp-color) 0%, var(--whatsapp-hover) 100%);
  color: var(--white);
  box-shadow: var(--shadow-lg), var(--shadow-whatsapp);
}

.fab-option.telegram {
  border-color: var(--telegram-color);
  background: linear-gradient(135deg, var(--white) 0%, var(--telegram-light) 100%);
}

.fab-option.telegram:hover {
  background: linear-gradient(135deg, var(--telegram-color) 0%, var(--telegram-hover) 100%);
  color: var(--white);
  box-shadow: var(--shadow-lg), var(--shadow-telegram);
}

.fab-option.messenger {
  border-color: var(--messenger-color);
  background: linear-gradient(135deg, var(--white) 0%, var(--messenger-light) 100%);
}

.fab-option.messenger:hover {
  background: linear-gradient(135deg, var(--messenger-color) 0%, var(--messenger-hover) 100%);
  color: var(--white);
  box-shadow: var(--shadow-lg), var(--shadow-messenger);
}

/* ===== CHAT BACKDROP ===== */
.chat-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  backdrop-filter: blur(4px);
}

.chat-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===== AI CHAT WINDOW ===== */
.ai-chat-window {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  max-width: calc(100vw - 40px);
  height: 650px;
  max-height: calc(100vh - 40px);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1001;
  transform: translateY(100px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-bounce);
  font-family: var(--font-family);
  border: 1px solid var(--gray-200);
}

.ai-chat-window.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* ===== CHAT HEADER ===== */
.ai-chat-header {
  background: linear-gradient(135deg, var(--ai-color) 0%, var(--ai-hover) 100%);
  color: var(--white);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.ai-chat-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.header-avatar {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-sm);
}

.header-title h3 {
  margin: 0;
  font-size: 19px;
  font-weight: var(--font-weight-bold);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}

.online-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  opacity: 0.9;
  font-weight: var(--font-weight-medium);
}

.status-dot {
  width: 10px;
  height: 10px;
  background: #4ade80;
  border-radius: 50%;
  animation: statusBlink 2s infinite;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.close-chat-window {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.close-chat-window:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

/* ===== CHAT BODY ===== */
.ai-chat-body {
  flex-grow: 1;
  padding: 24px;
  overflow-y: auto;
  background: linear-gradient(to bottom, var(--gray-50), var(--white));
  position: relative;
}

.ai-chat-body::-webkit-scrollbar {
  width: 6px;
}

.ai-chat-body::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 3px;
}

.ai-chat-body::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--ai-color), var(--ai-hover));
  border-radius: 3px;
}

.ai-chat-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, var(--ai-hover), var(--ai-color));
}

/* ===== MESSAGES ===== */
.welcome-message {
  margin-bottom: 24px;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  animation: slideInUp var(--transition-normal);
}

.message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--ai-color), var(--ai-hover));
  color: var(--white);
  border: 2px solid var(--ai-light);
  box-shadow: var(--shadow-sm);
}

.message.user .message-avatar {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  border-color: var(--primary-light);
}

.message-content {
  max-width: 75%;
  position: relative;
}

.message-text {
  background: var(--white);
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  line-height: 1.6;
  word-wrap: break-word;
  position: relative;
  border: 1px solid var(--gray-200);
  font-size: 15px;
}

.message.user .message-text {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: var(--white);
  border-color: var(--primary-light);
}

.message-text::before {
  content: "";
  position: absolute;
  top: 12px;
  width: 0;
  height: 0;
  border: 8px solid transparent;
}

.message.ai .message-text::before {
  left: -15px;
  border-right-color: var(--white);
}

.message.user .message-text::before {
  right: -15px;
  border-left-color: var(--primary-color);
}

.message-time {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 6px;
  text-align: right;
  font-weight: var(--font-weight-medium);
}

.message.user .message-time {
  text-align: left;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  animation: slideInUp var(--transition-normal);
  border: 1px solid var(--gray-200);
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--ai-color);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

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

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

/* ===== CHAT FOOTER ===== */
.ai-chat-footer {
  padding: 24px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.input-container {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

#chatInput {
  flex-grow: 1;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-full);
  padding: 14px 20px;
  font-size: 15px;
  outline: none;
  transition: all var(--transition-fast);
  background: var(--gray-50);
  font-weight: var(--font-weight-medium);
  font-family: var(--font-family);
}

#chatInput:focus {
  border-color: var(--ai-color);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#sendChatButton {
  background: linear-gradient(135deg, var(--ai-color), var(--ai-hover));
  color: var(--white);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-ai);
}

#sendChatButton:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md), var(--shadow-ai);
}

#sendChatButton:active {
  transform: scale(0.95);
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-action {
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--gray-700);
  font-weight: var(--font-weight-semibold);
  position: relative;
  overflow: hidden;
  font-family: var(--font-family);
}

.quick-action::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left var(--transition-normal);
}

.quick-action:hover::before {
  left: 100%;
}

.quick-action:hover {
  background: linear-gradient(135deg, var(--ai-color), var(--ai-hover));
  color: var(--white);
  border-color: var(--ai-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm), var(--shadow-ai);
}

/* ===== MOBILE RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .fab-widget-container {
    bottom: 80px;
    right: 15px;
  }

  .fab-main-button {
    border-radius: 35px;
    box-shadow: var(--shadow-primary);
  }

  .fab-button-content {
    padding: 12px 18px;
    gap: 10px;
  }

  .fab-help-text {
    font-size: 14px;
    font-weight: var(--font-weight-extrabold);
  }

  .fab-icon {
    width: 20px;
    height: 20px;
  }

  .fab-options {
    gap: 12px;
    margin-bottom: 70px;
  }

  .fab-option {
    min-width: 150px;
    border-radius: var(--radius-lg);
    background: var(--white);
    color: var(--gray-700);
    border-color: transparent;
    box-shadow: var(--shadow-md);
  }

  .option-content {
    padding: 12px 16px;
    gap: 10px;
  }

  .option-icon {
    width: 18px;
    height: 18px;
  }

  .option-text {
    font-size: 14px;
    font-weight: var(--font-weight-bold);
  }

  .fab-option:hover {
    transform: translateX(-8px) scale(1.03);
  }

  /* Mobile Chat Window - Same as Desktop */
  .ai-chat-window {
    bottom: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    border-radius: var(--radius-xl);
    background: var(--white);
    color: var(--gray-700);
    border-color: var(--gray-200);
    box-shadow: var(--shadow-xl);
  }

  .ai-chat-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--ai-color), var(--ai-hover));
  }

  .header-avatar {
    width: 42px;
    height: 42px;
  }

  .header-title h3 {
    font-size: 17px;
    font-weight: var(--font-weight-bold);
  }

  .ai-chat-body {
    padding: 16px;
    background: linear-gradient(to bottom, var(--gray-50), var(--white));
  }

  .message-content {
    max-width: 82%;
  }

  .message-text {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-700);
    border-color: var(--gray-200);
  }

  .message.user .message-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--white);
  }

  .message.ai .message-text::before {
    border-right-color: var(--white);
  }

  .ai-chat-footer {
    padding: 16px;
    background: var(--white);
    border-color: var(--gray-200);
  }

  .input-container {
    margin-bottom: 14px;
  }

  #chatInput {
    font-size: 16px;
    padding: 12px 18px;
    border-radius: 25px;
    background: var(--gray-50);
    color: var(--gray-700);
    border-color: var(--gray-300);
  }

  #chatInput::placeholder {
    color: var(--gray-500);
  }

  #chatInput:focus {
    background: var(--white);
    border-color: var(--ai-color);
  }

  #sendChatButton {
    width: 44px;
    height: 44px;
  }

  .quick-actions {
    gap: 8px;
  }

  .quick-action {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-bold);
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
    color: var(--gray-700);
    border-color: var(--gray-300);
  }

  .typing-indicator {
    background: var(--white);
    border-color: var(--gray-200);
  }

  /* Mobile Animations */
  .fab-option {
    animation: slideInRight 0.4s ease-out;
    animation-fill-mode: both;
  }

  .fab-option:nth-child(1) {
    animation-delay: 0.1s;
  }
  .fab-option:nth-child(2) {
    animation-delay: 0.2s;
  }
  .fab-option:nth-child(3) {
    animation-delay: 0.3s;
  }
  .fab-option:nth-child(4) {
    animation-delay: 0.4s;
  }
}

@keyframes bounce {
  0%,
  20%,
  53%,
  80%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  40%,
  43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

@media (max-width: 480px) {
  .fab-widget-container {
    bottom: 70px;
    right: 12px;
  }

  .fab-main-button {
    border-radius: 30px;
  }

  .fab-button-content {
    padding: 10px 16px;
    gap: 8px;
  }

  .fab-help-text {
    font-size: 13px;
    font-weight: var(--font-weight-extrabold);
  }

  .fab-icon {
    width: 18px;
    height: 18px;
  }

  .fab-options {
    margin-bottom: 60px;
    gap: 10px;
  }

  .fab-option {
    min-width: 140px;
    border-radius: var(--radius-md);
  }

  .option-content {
    padding: 10px 14px;
    gap: 8px;
  }

  .option-icon {
    width: 16px;
    height: 16px;
  }

  .option-text {
    font-size: 13px;
    font-weight: var(--font-weight-bold);
  }

  .ai-chat-window {
    height: calc(100vh - 110px);
    border-radius: var(--radius-lg);
  }

  .ai-chat-header {
    padding: 16px 18px;
  }

  .header-title h3 {
    font-size: 16px;
  }

  .ai-chat-body {
    padding: 14px;
  }

  .message-content {
    max-width: 85%;
  }

  .message-text {
    padding: 10px 14px;
    font-size: 13px;
  }

  .ai-chat-footer {
    padding: 14px;
  }

  #chatInput {
    padding: 10px 16px;
    font-size: 16px;
  }

  #sendChatButton {
    width: 40px;
    height: 40px;
  }

  .quick-action {
    padding: 6px 12px;
    font-size: 11px;
    flex: 1;
    text-align: center;
    min-width: 0;
  }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-width: 768px) and (orientation: landscape) {
  .ai-chat-window {
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
  }

  .fab-widget-container {
    bottom: 15px;
  }

  .fab-options {
    gap: 8px;
  }

  .fab-option {
    min-width: 130px;
  }

  .option-content {
    padding: 8px 12px;
  }

  .option-text {
    font-size: 12px;
  }
}

/* ===== VERY SMALL SCREENS ===== */
@media (max-width: 360px) {
  .fab-help-text {
    font-size: 12px;
    font-weight: var(--font-weight-extrabold);
  }

  .fab-button-content {
    padding: 8px 12px;
  }

  .fab-options {
    gap: 8px;
  }

  .fab-option {
    min-width: 130px;
  }

  .option-content {
    padding: 8px 12px;
  }

  .option-text {
    font-size: 12px;
    font-weight: var(--font-weight-bold);
  }

  .option-icon {
    width: 14px;
    height: 14px;
  }
}

/* ===== iOS SAFARI FIXES ===== */
@supports (-webkit-touch-callout: none) {
  .ai-chat-window {
    height: calc(100vh - 140px);
  }

  #chatInput {
    font-size: 16px !important;
  }
}

/* ===== ADDITIONAL MOBILE ENHANCEMENTS ===== */
@media (max-width: 768px) {
  .fab-options {
    right: 0;
    max-width: calc(100vw - 30px);
    overflow: visible;
  }

  .fab-option {
    min-height: 48px;
  }

  .chat-backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
  }

  .message {
    margin-bottom: 14px;
  }

  .typing-indicator {
    padding: 12px 16px;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .quick-action:last-child {
    grid-column: 1 / -1;
  }

  .fab-options {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
  }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
  .fab-main-button {
    box-shadow: var(--shadow-primary);
  }

  .fab-option {
    box-shadow: var(--shadow-md);
  }

  .ai-chat-window {
    box-shadow: var(--shadow-xl);
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: high) {
  :root {
    --primary-color: #d00000;
    --ai-color: #4338ca;
    --whatsapp-color: #128c7e;
    --telegram-color: #005580;
    --messenger-color: #004494;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .fab-widget-container,
  .ai-chat-window,
  .chat-backdrop {
    display: none !important;
  }
}
