/* ==========================================================================
   Noupe AI Chatbot — Kisan Katha Professional Chatbot Stylesheet
   Glassmorphism UI, Responsive Floating Launcher, Quick Reply Chips, Voice AI
   ========================================================================== */

/* Root fallback variables for Noupe Chatbot */
:root {
  --noupe-primary: #165b33;
  --noupe-primary-dark: #0f4223;
  --noupe-accent-green: #10b981;
  --noupe-accent-gold: #f59e0b;
  --noupe-bg-light: #ffffff;
  --noupe-bg-dark: #111c14;
  --noupe-text-light: #1e3325;
  --noupe-text-dark: #e2ede6;
  --noupe-card-light: #f4f8f5;
  --noupe-card-dark: #18281d;
  --noupe-border-light: rgba(22, 91, 51, 0.12);
  --noupe-border-dark: rgba(255, 255, 255, 0.12);
  --noupe-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  --noupe-radius: 18px;
  --noupe-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --noupe-font: 'Plus Jakarta Sans', 'Outfit', system-ui, -apple-system, sans-serif;
}

/* Floating Launcher Container */
.noupe-launcher-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--noupe-font);
}

/* Callout Tooltip Banner */
.noupe-tooltip-popover {
  position: relative;
  background: var(--glass-bg, rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color, rgba(22, 91, 51, 0.15));
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  padding: 10px 16px;
  border-radius: 14px;
  margin-bottom: 12px;
  max-width: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  animation: noupePopBounce 0.5s ease-out;
  transition: var(--noupe-transition);
}

body.dark-theme .noupe-tooltip-popover {
  background: rgba(18, 33, 22, 0.92);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.noupe-tooltip-popover:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.noupe-tooltip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #165b33);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.noupe-tooltip-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color, #1e3325);
  line-height: 1.3;
}

body.dark-theme .noupe-tooltip-text {
  color: #e2ede6;
}

.noupe-tooltip-close {
  background: transparent;
  border: none;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
}
.noupe-tooltip-close:hover {
  color: #e63946;
}

/* Floating Launcher Button */
.noupe-launcher-btn {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #165b33 0%, #10b981 100%);
  border: 3px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(22, 91, 51, 0.35);
  transition: var(--noupe-transition);
}

.noupe-launcher-btn:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 14px 40px rgba(16, 185, 129, 0.45);
}

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

.noupe-pulse-ring {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: noupePulseRing 2.2s infinite ease-out;
  pointer-events: none;
}

.noupe-launcher-icon {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}

.noupe-launcher-btn.active .noupe-launcher-icon {
  transform: rotate(90deg);
}

.noupe-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: noupeBadgeBounce 0.4s ease-out;
}

/* Main Chat Modal Container */
.noupe-chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 410px;
  max-width: calc(100vw - 32px);
  height: 640px;
  max-height: calc(100vh - 120px);
  background: var(--bg-card, #ffffff);
  border-radius: var(--noupe-radius);
  box-shadow: var(--noupe-shadow);
  border: 1px solid var(--border-color, rgba(22, 91, 51, 0.12));
  display: flex;
  flex-direction: column;
  z-index: 99998;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  font-family: var(--noupe-font);
}

body.dark-theme .noupe-chat-window {
  background: var(--bg-card, #122116);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-color, #e2ede6);
}

.noupe-chat-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.noupe-chat-window.expanded {
  width: 680px;
  height: 720px;
}

/* Chat Header */
.noupe-chat-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, #165b33 0%, #0f4223 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.noupe-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.noupe-bot-avatar-header {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.noupe-bot-avatar-header img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.noupe-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background: #10b981;
  border: 2px solid #165b33;
  border-radius: 50%;
}

.noupe-title-group h3 {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.noupe-badge-tag {
  font-size: 9px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.9);
  color: #000;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.noupe-title-group p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
  margin: 2px 0 0 0;
}

.noupe-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.noupe-header-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.noupe-header-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Interactive Navigation Tabs */
.noupe-nav-tabs {
  display: flex;
  background: rgba(22, 91, 51, 0.06);
  border-bottom: 1px solid var(--border-color, rgba(22, 91, 51, 0.1));
  padding: 4px;
  gap: 4px;
  flex-shrink: 0;
}
body.dark-theme .noupe-nav-tabs {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.noupe-nav-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted, #567360);
  font-family: var(--noupe-font);
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}
body.dark-theme .noupe-nav-tab {
  color: #83a38d;
}

.noupe-nav-tab:hover {
  color: var(--text-color, #1e3325);
  background: rgba(22, 91, 51, 0.08);
}
body.dark-theme .noupe-nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.noupe-nav-tab.active {
  background: #ffffff;
  color: #165b33;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
body.dark-theme .noupe-nav-tab.active {
  background: #18281d;
  color: #10b981;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.noupe-tab-icon {
  font-size: 14px;
}

/* Tab Views Container */
.noupe-tab-view {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.noupe-tab-view.active {
  display: flex;
}

/* Noupe Agent View & Iframe */
.noupe-agent-container {
  width: 100%;
  height: 100%;
  flex: 1;
  background: #ffffff;
  position: relative;
}
body.dark-theme .noupe-agent-container {
  background: #111c14;
}

.noupe-agent-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Chat Controls Subheader Bar */
.noupe-subbar {
  padding: 8px 14px;
  background: rgba(22, 91, 51, 0.05);
  border-bottom: 1px solid var(--border-color, rgba(22, 91, 51, 0.08));
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  flex-shrink: 0;
}

body.dark-theme .noupe-subbar {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.noupe-lang-select {
  background: var(--bg-light, #ffffff);
  border: 1px solid var(--border-color, rgba(22, 91, 51, 0.2));
  color: var(--text-color, #1e3325);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

body.dark-theme .noupe-lang-select {
  background: #18281d;
  color: #e2ede6;
  border-color: rgba(255, 255, 255, 0.2);
}

.noupe-sub-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted, #567360);
}

.noupe-sound-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted, #567360);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
}
body.dark-theme .noupe-sound-toggle-btn {
  color: #83a38d;
}

/* Chat Messages Scroll Container */
.noupe-messages-container {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.noupe-messages-container::-webkit-scrollbar {
  width: 5px;
}
.noupe-messages-container::-webkit-scrollbar-thumb {
  background: rgba(22, 91, 51, 0.2);
  border-radius: 4px;
}

/* Date / Security Notice */
.noupe-notice-divider {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted, #567360);
  margin: 4px 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.noupe-notice-divider::before,
.noupe-notice-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color, rgba(22, 91, 51, 0.1));
}

/* Message Bubble */
.noupe-msg {
  display: flex;
  gap: 10px;
  max-width: 90%;
  animation: noupeSlideIn 0.3s ease-out;
}

.noupe-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

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

.noupe-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
}

.noupe-msg.bot .noupe-msg-avatar {
  background: linear-gradient(135deg, #10b981, #165b33);
  color: #ffffff;
}

.noupe-msg.user .noupe-msg-avatar {
  background: #f59e0b;
  color: #000000;
}

.noupe-msg-content {
  background: var(--noupe-card-light, #f4f8f5);
  color: var(--text-color, #1e3325);
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color, rgba(22, 91, 51, 0.08));
}

body.dark-theme .noupe-msg-content {
  background: #18281d;
  color: #e2ede6;
  border-color: rgba(255, 255, 255, 0.08);
}

.noupe-msg.user .noupe-msg-content {
  background: linear-gradient(135deg, #165b33, #0f4223);
  color: #ffffff;
  border-top-right-radius: 4px;
  border-top-left-radius: 14px;
  border: none;
}

.noupe-msg.bot .noupe-msg-content {
  border-top-left-radius: 4px;
}

.noupe-msg-content p {
  margin: 0 0 8px 0;
}
.noupe-msg-content p:last-child {
  margin-bottom: 0;
}

.noupe-msg-content ul, .noupe-msg-content ol {
  margin: 6px 0 6px 18px;
  padding: 0;
}

.noupe-msg-content li {
  margin-bottom: 4px;
}

.noupe-msg-time {
  font-size: 10px;
  color: var(--text-muted, #888);
  margin-top: 4px;
  text-align: right;
  display: block;
}

.noupe-msg.user .noupe-msg-time {
  color: rgba(255, 255, 255, 0.7);
}

/* In-Chat Interactive Action Buttons */
.noupe-action-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.noupe-action-trigger-btn {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.noupe-action-trigger-btn:hover {
  background: #10b981;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Message Speaker TTS Button */
.noupe-tts-btn {
  background: none;
  border: none;
  color: var(--text-muted, #567360);
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 6px;
  vertical-align: middle;
  transition: color 0.2s;
}
.noupe-tts-btn:hover {
  color: #10b981;
}

/* Quick Action Suggestion Chips */
.noupe-quick-chips-wrapper {
  padding: 8px 14px;
  background: var(--bg-card, #ffffff);
  border-top: 1px solid var(--border-color, rgba(22, 91, 51, 0.08));
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

body.dark-theme .noupe-quick-chips-wrapper {
  background: #122116;
  border-color: rgba(255, 255, 255, 0.08);
}

.noupe-quick-chips-wrapper::-webkit-scrollbar {
  height: 3px;
}
.noupe-quick-chips-wrapper::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.3);
}

.noupe-chip {
  background: rgba(22, 91, 51, 0.06);
  border: 1px solid rgba(22, 91, 51, 0.15);
  color: var(--text-color, #165b33);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--noupe-transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

body.dark-theme .noupe-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e2ede6;
}

.noupe-chip:hover {
  background: #165b33;
  color: #ffffff;
  border-color: #165b33;
  transform: translateY(-1.5px);
}

/* Chat Input Bar */
.noupe-input-area {
  padding: 12px 14px;
  background: var(--bg-card, #ffffff);
  border-top: 1px solid var(--border-color, rgba(22, 91, 51, 0.1));
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

body.dark-theme .noupe-input-area {
  background: #122116;
  border-color: rgba(255, 255, 255, 0.1);
}

.noupe-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.noupe-chat-input {
  width: 100%;
  padding: 10px 42px 10px 14px;
  border-radius: 22px;
  border: 1.5px solid var(--border-color, rgba(22, 91, 51, 0.2));
  background: var(--bg-light, #f4f8f5);
  color: var(--text-color, #1e3325);
  font-size: 13.5px;
  font-family: var(--noupe-font);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.dark-theme .noupe-chat-input {
  background: #18281d;
  color: #e2ede6;
  border-color: rgba(255, 255, 255, 0.2);
}

.noupe-chat-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Mic STT Button */
.noupe-mic-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted, #567360);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.noupe-mic-btn:hover {
  color: #10b981;
}

.noupe-mic-btn.recording {
  color: #ef4444;
  animation: noupePulseMic 1.2s infinite;
}

/* Send Button */
.noupe-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #165b33, #10b981);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--noupe-transition);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.noupe-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

.noupe-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Typing Indicator Animation */
.noupe-typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
}

.noupe-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: noupeTyping 1.4s infinite ease-in-out;
}

.noupe-typing-dot:nth-child(1) { animation-delay: 0s; }
.noupe-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.noupe-typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Settings Modal Drawer (Noupe Embed Loader) */
.noupe-settings-panel {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-card, #ffffff);
  z-index: 10;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

body.dark-theme .noupe-settings-panel {
  background: #122116;
}

.noupe-settings-panel.active {
  transform: translateY(0);
}

.noupe-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color, rgba(22, 91, 51, 0.1));
  padding-bottom: 10px;
}

.noupe-settings-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-color, #165b33);
}

body.dark-theme .noupe-settings-title {
  color: #ffffff;
}

.noupe-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.noupe-form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-color, #1e3325);
}
body.dark-theme .noupe-form-group label {
  color: #e2ede6;
}

.noupe-form-input, .noupe-form-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color, rgba(22, 91, 51, 0.2));
  border-radius: 8px;
  background: var(--bg-light, #f4f8f5);
  color: var(--text-color, #1e3325);
  font-size: 12px;
  font-family: inherit;
}
body.dark-theme .noupe-form-input, body.dark-theme .noupe-form-textarea {
  background: #18281d;
  color: #e2ede6;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes noupePopBounce {
  0% { transform: scale(0.8) translateY(10px); opacity: 0; }
  70% { transform: scale(1.05) translateY(-2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes noupePulseRing {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

@keyframes noupeBadgeBounce {
  0% { transform: scale(0); }
  80% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

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

@keyframes noupeTyping {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-4px); opacity: 1; }
}

@keyframes noupePulseMic {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* Comprehensive Multi-Device Responsive Rules */

/* 1. Large Tablets & Small Laptops (769px to 1024px) */
@media (max-width: 1024px) {
  .noupe-chat-window {
    width: 380px;
    height: 580px;
    bottom: 90px;
    right: 20px;
  }
  .noupe-chat-window.expanded {
    width: 90vw;
    height: 85vh;
  }
}

/* 2. Medium Tablets & Large Mobiles (481px to 768px) */
@media (max-width: 768px) {
  .noupe-launcher-wrapper {
    bottom: 20px;
    right: 20px;
  }
  .noupe-chat-window {
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 550px;
    max-height: calc(100vh - 100px);
    bottom: 86px;
    right: 16px;
    border-radius: 16px;
  }
  .noupe-chat-input {
    font-size: 16px; /* Prevents auto-zoom on mobile Safari / Chrome */
  }
  .noupe-tooltip-popover {
    max-width: 220px;
    font-size: 12px;
  }
}

/* 3. Smartphones & Small Mobiles (max-width: 480px) */
@media (max-width: 480px) {
  .noupe-launcher-wrapper {
    bottom: 16px;
    right: 16px;
  }
  .noupe-launcher-btn {
    width: 56px;
    height: 56px;
  }
  .noupe-launcher-icon {
    width: 24px;
    height: 24px;
  }
  .noupe-chat-window {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    border: none;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .noupe-chat-window.expanded {
    width: 100vw;
    height: 100vh;
  }
  .noupe-chat-header {
    padding: 12px 14px;
  }
  .noupe-title-group h3 {
    font-size: 14px;
  }
  .noupe-title-group p {
    font-size: 10px;
  }
  .noupe-msg-content {
    font-size: 13px;
    padding: 10px 12px;
  }
  .noupe-chip {
    padding: 5px 10px;
    font-size: 11px;
  }
  .noupe-input-area {
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}

/* 4. Landscape Mode on Mobiles (max-height: 520px) */
@media (max-height: 520px) and (orientation: landscape) {
  .noupe-chat-window {
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  .noupe-chat-header {
    padding: 8px 14px;
  }
  .noupe-subbar {
    padding: 4px 14px;
  }
  .noupe-messages-container {
    padding: 10px;
    gap: 8px;
  }
  .noupe-quick-chips-wrapper {
    padding: 4px 10px;
  }
  .noupe-input-area {
    padding: 6px 10px;
  }
}
