/* AgriTech - Premium Agriculture-Tech SaaS Styles */

/* ===== CSS Variables ===== */
:root {
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #bbf7d0;
  --secondary: #3b82f6;
  --secondary-dark: #2563eb;
  --accent: #f59e0b;
  --bg-light: #f0fdf4;
  --bg-dark: #052e16;
  --text-dark: #1a1a1a;
  --text-light: #f8fafc;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ===== Base Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Hind Siliguri', 'SolaimanLipi', 'Kalpurush', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ===== Animations ===== */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(-3deg); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.1); }
}

@keyframes float-slow-delayed {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-25px) scale(0.95); }
}

@keyframes scroll {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
  50% { box-shadow: 0 0 20px 10px rgba(22, 163, 74, 0.1); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Animation Classes */
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-delayed { animation: float-delayed 8s ease-in-out infinite; }
.animate-float-slow { animation: float-slow 10s ease-in-out infinite; }
.animate-float-slow-delayed { animation: float-slow-delayed 12s ease-in-out infinite; }
.animate-scroll { animation: scroll 2s ease-in-out infinite; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }
.animate-slide-in-right { animation: slideInRight 0.5s ease-out forwards; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-gradient { animation: gradient-shift 3s ease infinite; background-size: 200% 200%; }

/* ===== Chat Interface ===== */
.chat-container {
  max-width: min(1000px, 95vw);
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
}

.chat-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(22, 163, 74, 0.3);
  position: relative;
  z-index: 10;
}

.chat-header::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), transparent);
}

.chat-header .avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-light), white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.chat-header .status {
  font-size: 0.75rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-header .status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Messages Area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

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

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

.chat-messages::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Message Wrapper with Avatar */
.msg-wrapper {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 0.6rem;
  animation: fadeInUp 0.3s ease-out;
  opacity: 0;
  animation-fill-mode: forwards;
}
.msg-wrapper.user { flex-direction: row-reverse; }
.msg-wrapper.bot { flex-direction: row; }

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.msg-wrapper.user .msg-avatar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  margin-left: 0;
}
.msg-wrapper.bot .msg-avatar {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.msg {
  max-width: 80%;
  padding: 1rem 1.25rem;
  border-radius: 1.25rem;
  position: relative;
  line-height: 1.7;
}
.msg-wrapper.user .msg {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-bottom-right-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}
.msg-wrapper.bot .msg {
  align-self: flex-start;
  background: white;
  color: var(--text-dark);
  border-bottom-left-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #f3f4f6;
}
.msg-bot .chat-section-heading { color: #15803d; }
.msg-bot strong { color: #16a34a; }

/* Message Bubbles (legacy) */
.message {
  max-width: 80%;
  padding: 1rem 1.25rem;
  border-radius: 1.25rem;
  animation: fadeInUp 0.4s ease-out;
  position: relative;
  line-height: 1.7;
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-bottom-right-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.message.bot {
  align-self: flex-start;
  background: white;
  color: var(--text-dark);
  border-bottom-left-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #f3f4f6;
}

.msg .timestamp {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-top: 0.5rem;
  display: block;
}

.msg-user .timestamp {
  text-align: right;
  color: rgba(255,255,255,0.7);
}

/* Chat message formatting */
.chat-content { line-height: 1.7; }
.chat-section-heading { font-weight: 700; color: #15803d; margin-top: 10px; margin-bottom: 4px; font-size: 0.92rem; }
.chat-section-heading:first-child { margin-top: 0; }
.chat-line { margin-bottom: 2px; }
.chat-line-icon { margin-bottom: 6px; }
.chat-spacer { height: 6px; }
.chat-list { margin: 4px 0 4px 6px; }
.chat-list-item { padding: 2px 0 2px 12px; position: relative; font-size: 0.88rem; }
.chat-list-item::before { content: '•'; position: absolute; left: 0; color: #16a34a; font-weight: 700; }
.chat-table-row { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px solid #f0f0f0; }
.chat-table-row:first-child { border-bottom: 2px solid #16a34a; font-weight: 600; }
.chat-table-cell { flex: 1; font-size: 0.82rem; }
.msg-bot .chat-section-heading { color: #15803d; }
.msg-bot strong { color: #16a34a; }

/* Typing Indicator */
.typing {
  display: flex;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  background: white;
  border-radius: 1.25rem;
  border-bottom-left-radius: 0.5rem;
  max-width: 100px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #f3f4f6;
}
.typing-indicator {
  display: flex;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  background: white;
  border-radius: 1.25rem;
  border-bottom-left-radius: 0.5rem;
  align-self: flex-start;
  max-width: 100px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #f3f4f6;
}

.typing-dot {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  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; }
}

/* Chat Input */
.chat-input-area {
  padding: 1rem 1.5rem;
  background: white;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.chat-input-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.chat-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
  background: #f9fafb;
}

.chat-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
}

.chat-input::placeholder {
  color: #9ca3af;
}

.send-btn {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
  flex-shrink: 0;
  touch-action: manipulation;
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

.send-btn:active {
  transform: scale(0.95);
}

.send-btn:disabled {
  background: #d1d5db;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Quick Suggestions */
.quick-suggestions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  background: linear-gradient(to bottom, #f9fafb, white);
  border-top: 1px solid var(--border);
}

.suggestion-btn {
  padding: 0.6rem 1.2rem;
  background: white;
  border: 1.5px solid #e5e7eb;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  color: #374151;
  touch-action: manipulation;
}

.suggestion-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .message {
    max-width: 90%;
  }

  .quick-suggestions {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .quick-suggestions::-webkit-scrollbar {
    display: none;
  }

  .suggestion-btn {
    flex-shrink: 0;
  }

  .chat-header {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .chat-header .font-bold {
    font-size: 1rem;
  }

  .chat-messages {
    padding: 1rem;
  }

  .message {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .chat-input-area {
    padding: 0.75rem 1rem;
  }

  .chat-input {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .send-btn {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 380px) {
  .chat-header {
    padding: 0.625rem 0.75rem;
  }

  .chat-messages {
    padding: 0.75rem;
  }

  .message {
    max-width: 92%;
    padding: 0.625rem 0.875rem;
  }

  .chat-input-area {
    padding: 0.625rem 0.75rem;
  }
}

/* ===== Loading States ===== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Error States ===== */
.error-message {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #dc2626;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid #fecaca;
  font-size: 0.875rem;
  animation: fadeInUp 0.4s ease-out;
}

/* ===== Success States ===== */
.success-message {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  color: #16a34a;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid #bbf7d0;
  font-size: 0.875rem;
  animation: fadeInUp 0.4s ease-out;
}

/* ===== Card Hover Effects ===== */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ===== Gradient Text ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Glass Effect ===== */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== Selection ===== */
::selection {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ===== Focus Styles ===== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== Chat Widget (Floating Popup) ===== */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  height: 50px;
  padding: 0 22px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Hind Siliguri', sans-serif;
  box-shadow: 0 4px 20px rgba(22, 163, 74, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  animation: fab-pulse 3s ease-in-out infinite;
  white-space: nowrap;
  touch-action: manipulation;
}

.chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(22, 163, 74, 0.5);
}

.chat-fab:active {
  transform: scale(0.95);
}

.hidden { display: none !important; }
.chat-fab.hidden {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

.chat-fab-badge {
  display: none;
}

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(22, 163, 74, 0.4); }
  50% { box-shadow: 0 6px 32px rgba(22, 163, 74, 0.6), 0 0 0 8px rgba(22, 163, 74, 0.1); }
}

@keyframes badge-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Widget Overlay */
.chat-widget-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.chat-widget-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Widget Container */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 400px;
  height: 600px;
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 10001;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: scale(0.8) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom right;
}

.chat-widget.active {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chat-widget.minimized {
  height: auto;
  max-height: none;
  width: 280px;
  cursor: pointer;
  transform-origin: bottom right;
}

.chat-widget.minimized .chat-widget-messages,
.chat-widget.minimized .chat-widget-suggestions,
.chat-widget.minimized .chat-widget-input-area {
  display: none;
}

.chat-widget.minimized .chat-widget-minimize svg {
  transform: rotate(45deg);
}

.chat-widget.minimized .chat-widget-header {
  border-radius: 20px;
}

/* Widget Header */
.chat-widget-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
}

.chat-widget-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.04), transparent);
  pointer-events: none;
}

.chat-widget-avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #dcfce7, white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.chat-widget-header-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

.chat-widget-header-info .status {
  font-size: 0.72rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-widget-header-info .status::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}

.chat-widget-close {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
  flex-shrink: 0;
  touch-action: manipulation;
}

.chat-widget-close:hover {
  background: rgba(255,255,255,0.25);
  transform: rotate(90deg);
}

.chat-widget-minimize {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  touch-action: manipulation;
}

.chat-widget-minimize:hover {
  background: rgba(255,255,255,0.25);
}

/* Widget Messages */
.chat-widget-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  background: linear-gradient(to bottom, #f8faf9, #f1f5f3);
}

.chat-widget-messages::-webkit-scrollbar {
  width: 5px;
}

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

.chat-widget-messages::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.chat-widget-messages .message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  animation: fadeInUp 0.3s ease-out;
}

.chat-widget-messages .message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-bottom-right-radius: 6px;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.25);
}

.chat-widget-messages .message.bot {
  align-self: flex-start;
  background: white;
  color: #1a1a1a;
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
}

.chat-widget-messages .message .timestamp {
  font-size: 0.65rem;
  opacity: 0.5;
  margin-top: 4px;
  display: block;
}

.chat-widget-messages .message.user .timestamp {
  text-align: right;
  color: rgba(255,255,255,0.7);
}

/* Welcome Card inside widget */
.chat-widget-welcome {
  padding: 1rem 1.25rem;
  background: white;
  border-radius: 1.25rem;
  border-bottom-left-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #f3f4f6;
  max-width: 80%;
  line-height: 1.7;
}

.chat-widget-welcome h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #15803d;
  margin: 0 0 6px;
}

.chat-widget-welcome p {
  font-size: 0.8rem;
  color: #4b5563;
  margin: 0;
  line-height: 1.6;
}

/* Typing indicator inside widget */
.chat-widget-messages .typing-indicator {
  padding: 10px 14px;
  max-width: 80px;
  border-radius: 16px;
  border-bottom-left-radius: 6px;
}

.chat-widget-messages .typing-dot {
  width: 8px;
  height: 8px;
}

/* Widget Suggestions */
.chat-widget-suggestions {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  overflow-x: auto;
  flex-shrink: 0;
  background: white;
  border-top: 1px solid #f0f0f0;
  -webkit-overflow-scrolling: touch;
}

.chat-widget-suggestions::-webkit-scrollbar {
  display: none;
}

.chat-widget-suggestions .suggestion-btn {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 20px;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  color: #15803d;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
  flex-shrink: 0;
}

.chat-widget-suggestions .suggestion-btn:hover {
  background: #dcfce7;
  border-color: #86efac;
}

/* Widget Input */
.chat-widget-input-area {
  padding: 12px 16px;
  background: white;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.chat-widget-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-widget-input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 24px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: all 0.3s;
  background: #f9fafb;
  min-width: 0;
}

.chat-widget-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.chat-widget-input::placeholder {
  color: #9ca3af;
}

.chat-widget-send {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.3);
  flex-shrink: 0;
  touch-action: manipulation;
}

.chat-widget-send:hover {
  transform: scale(1.08);
}

.chat-widget-send:active {
  transform: scale(0.92);
}

.chat-widget-send:disabled {
  background: #d1d5db;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ===== Chat Widget Mobile ===== */
@media (max-width: 480px) {
  .chat-fab {
    bottom: 18px;
    right: 18px;
    height: 46px;
    padding: 0 18px;
    font-size: 0.82rem;
  }

  .chat-widget {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    transform: translateY(100%);
    opacity: 1;
  }

  .chat-widget.active {
    transform: translateY(0);
  }

  .chat-widget-header {
    padding: 14px 16px;
    border-radius: 0;
  }

  .chat-widget-messages {
    padding: 12px;
  }

  .chat-widget-messages .message {
    max-width: 90%;
    font-size: 0.85rem;
  }

  .chat-widget-suggestions {
    padding: 8px 12px;
  }

  .chat-widget-input-area {
    padding: 10px 12px;
    /* Safe area for iOS */
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .chat-widget-input {
    padding: 9px 14px;
    font-size: 0.85rem;
  }

  .chat-widget-send {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}

/* ===== Utility ===== */
.no-underline { text-decoration: none; }

/* ===== Print Styles ===== */
@media print {
  .chat-header,
  .chat-input-area,
  .quick-suggestions {
    display: none;
  }

  .chat-messages {
    overflow: visible;
    height: auto;
  }
}

/* Global Footer */
.footer-text {
  text-align: center;
  padding: 10px 16px;
  font-size: 11px;
  color: #9ca3af;
  background: white;
  border-top: 1px solid #f3f4f6;
}
