/**
 * Bee1 Interactive Chat - 2026 Premium Design
 * עיצוב מודרני עם CSS Variables לתמיכה בפלטות צבעים
 */

/* ========== Default CSS Variables (Dark Preset) ========== */
:root {
  --bee1-chat-bg: #1a1d23;
  --bee1-chat-surface: #2a2d35;
  --bee1-chat-input-bg: #22252d;
  --bee1-chat-border: rgba(255,255,255,0.06);
  --bee1-chat-text: #e2e8f0;
  --bee1-chat-text-muted: rgba(255,255,255,0.35);
  --bee1-chat-text-time: rgba(255,255,255,0.3);
  --bee1-chat-accent: #25D366;
  --bee1-chat-accent-dark: #128C7E;
  --bee1-chat-accent-shadow: rgba(37, 211, 102, 0.3);
  --bee1-chat-accent-hover: rgba(37, 211, 102, 0.15);
  --bee1-chat-header-bg: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  --bee1-chat-header-text: white;
  --bee1-chat-header-subtitle: rgba(255,255,255,0.85);
  --bee1-chat-avatar-bg: rgba(255, 255, 255, 0.2);
  --bee1-chat-avatar-border: rgba(255,255,255,0.3);
  --bee1-chat-close-bg: rgba(255, 255, 255, 0.15);
  --bee1-chat-scroll-thumb: rgba(255,255,255,0.1);
  --bee1-chat-bot-bubble: #2a2d35;
  --bee1-chat-bot-text: #e2e8f0;
  --bee1-chat-user-bubble: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  --bee1-chat-user-text: white;
  --bee1-chat-send-bg: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  --bee1-chat-send-icon: #ffffff;
  /* Interest buttons: must contrast with surface (no dark-on-dark) */
  --bee1-chat-btn-bg: #3a404c;
  --bee1-chat-btn-border: rgba(37, 211, 102, 0.5);
  --bee1-chat-btn-text: #f8fafc;
  --bee1-chat-btn-hover-bg: rgba(37, 211, 102, 0.22);
  --bee1-chat-btn-hover-border: #25D366;
  --bee1-chat-btn-hover-text: #86efac;
  --bee1-chat-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.06);
  --bee1-chat-footer-text: rgba(255,255,255,0.2);
  --bee1-chat-progress-bg: rgba(255,255,255,0.08);
  --bee1-chat-progress-active: #25D366;
  --bee1-chat-progress-done: rgba(37, 211, 102, 0.4);
  --bee1-chat-typing-dot: #64748b;
}

/* ========== Chat Trigger ========== */
.bee1-chat-trigger,
#footer_link_wrapper,
#footer_link_wrapper .bee1-chat-trigger {
  cursor: pointer !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 2147483001 !important;
  position: relative;
}

/* Launcher wrapper must sit above sticky footers */
div#footer_link_wrapper {
  z-index: 2147483001 !important;
  position: fixed !important;
}

.bee1-chat-trigger:hover {
  transform: scale(1.08) !important;
}

/* ========== Chat Window ========== */
/* z-index above sticky footers / Elementor / accessibility widgets.
   reparented to document.body in JS so transform parents don't trap position:fixed */
#bee1-chat-window {
  position: fixed !important;
  bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
  right: 10px !important;
  left: auto !important;
  width: 400px;
  height: 620px;
  max-height: calc(100dvh - 32px);
  max-height: calc(100vh - 32px);
  background: var(--bee1-chat-bg);
  border-radius: 20px;
  box-shadow: var(--bee1-chat-shadow);
  display: flex;
  flex-direction: column;
  z-index: 2147483000 !important;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom right;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  direction: rtl;
  isolation: isolate;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

#bee1-chat-window.bee1-chat-hidden {
  opacity: 0;
  transform: scale(0.85) translateY(30px);
  pointer-events: none;
}

/* ========== Header ========== */
.bee1-chat-header {
  background: var(--bee1-chat-header-bg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

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

.bee1-chat-header-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bee1-chat-avatar {
  width: 46px;
  height: 46px;
  background: var(--bee1-chat-avatar-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  backdrop-filter: blur(10px);
  border: 2px solid var(--bee1-chat-avatar-border);
}

.bee1-chat-header-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bee1-chat-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--bee1-chat-header-text);
  line-height: 1.2;
}

.bee1-chat-subtitle {
  font-size: 12px;
  color: var(--bee1-chat-header-subtitle);
}

.bee1-chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--bee1-chat-header-subtitle);
}

.bee1-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: bee1-glow 2s infinite;
}

.bee1-dot-open {
  background: #4ADE80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.bee1-dot-closed {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

@keyframes bee1-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.bee1-chat-close {
  background: var(--bee1-chat-close-bg);
  border: none;
  color: var(--bee1-chat-header-text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.25s;
  backdrop-filter: blur(10px);
}

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

/* ========== Messages Area ========== */
.bee1-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bee1-chat-bg);
}

.bee1-chat-messages::-webkit-scrollbar { width: 4px; }
.bee1-chat-messages::-webkit-scrollbar-track { background: transparent; }
.bee1-chat-messages::-webkit-scrollbar-thumb { background: var(--bee1-chat-scroll-thumb); border-radius: 2px; }

/* ========== Messages ========== */
.bee1-message {
  display: flex;
  margin-bottom: 4px;
  animation: bee1-msg-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bee1-message-bot { justify-content: flex-start; }
.bee1-message-user { justify-content: flex-end; }

@keyframes bee1-msg-in {
  0% { opacity: 0; transform: translateY(12px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.bee1-message-content {
  max-width: 82%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bee1-message-text {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
}

.bee1-message-bot .bee1-message-text {
  background: var(--bee1-chat-bot-bubble);
  color: var(--bee1-chat-bot-text);
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.bee1-message-user .bee1-message-text {
  background: var(--bee1-chat-user-bubble);
  color: var(--bee1-chat-user-text);
  border-bottom-left-radius: 6px;
  margin-right: auto;
}

.bee1-message-time {
  font-size: 10px;
  color: var(--bee1-chat-text-time);
  padding: 0 4px;
}

.bee1-message-user .bee1-message-time {
  text-align: left;
}

/* ========== Typing Indicator ========== */
.bee1-typing-indicator {
  display: flex;
  gap: 5px;
  padding: 14px 18px;
  background: var(--bee1-chat-bot-bubble);
  border-radius: 18px;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  width: fit-content;
}

.bee1-typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--bee1-chat-typing-dot);
  border-radius: 50%;
  animation: bee1-typing 1.4s infinite;
}

.bee1-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.bee1-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bee1-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; background: var(--bee1-chat-accent); }
}

/* ========== Input Area ========== */
.bee1-chat-input-area {
  padding: 16px 20px 20px;
  background: var(--bee1-chat-input-bg);
  border-top: 1px solid var(--bee1-chat-border);
}

/* ========== Buttons ========== */
.bee1-chat-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bee1-chat-btn {
  padding: 13px 18px;
  background: var(--bee1-chat-btn-bg);
  border: 2px solid var(--bee1-chat-btn-border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bee1-chat-btn-text);
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
  flex: 1 1 auto;
  min-width: calc(50% - 8px);
  /* Always look tappable — not only on hover */
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 12px rgba(0, 0, 0, 0.28);
}

.bee1-chat-btn:hover {
  background: var(--bee1-chat-btn-hover-bg);
  border-color: var(--bee1-chat-btn-hover-border);
  color: var(--bee1-chat-btn-hover-text);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--bee1-chat-accent-shadow);
}

.bee1-chat-btn:focus-visible {
  outline: 2px solid var(--bee1-chat-accent);
  outline-offset: 2px;
}

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

/* ========== Text Input ========== */
.bee1-chat-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.bee1-chat-input-row .bee1-chat-input {
  flex: 1 1 0%;
  min-width: 0;
  width: auto;
  margin: 0;
}

.bee1-chat-input-row .bee1-chat-send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.bee1-chat-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Force readable typed text — theme CSS often sets input { color:#111 } → dark-on-dark */
#bee1-chat-window .bee1-chat-input,
#bee1-chat-window .bee1-chat-textarea,
#bee1-chat-window input.bee1-chat-input,
#bee1-chat-window textarea.bee1-chat-textarea,
.bee1-chat-input,
.bee1-chat-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--bee1-chat-btn-border, rgba(255,255,255,0.12)) !important;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--bee1-chat-text, #e2e8f0) !important;
  -webkit-text-fill-color: var(--bee1-chat-text, #e2e8f0) !important;
  caret-color: var(--bee1-chat-accent, #25D366) !important;
  background: var(--bee1-chat-surface, #2a2d35) !important;
  background-color: var(--bee1-chat-surface, #2a2d35) !important;
  transition: border-color 0.25s, box-shadow 0.25s;
  resize: none;
  box-sizing: border-box;
  direction: rtl;
  color-scheme: dark;
  opacity: 1 !important;
}

#bee1-chat-window .bee1-chat-input::placeholder,
#bee1-chat-window .bee1-chat-textarea::placeholder,
.bee1-chat-input::placeholder,
.bee1-chat-textarea::placeholder {
  color: var(--bee1-chat-text-muted, rgba(255,255,255,0.45)) !important;
  -webkit-text-fill-color: var(--bee1-chat-text-muted, rgba(255,255,255,0.45)) !important;
  opacity: 1 !important;
}

#bee1-chat-window .bee1-chat-input:focus,
#bee1-chat-window .bee1-chat-textarea:focus,
.bee1-chat-input:focus,
.bee1-chat-textarea:focus {
  outline: none !important;
  border-color: var(--bee1-chat-accent, #25D366) !important;
  box-shadow: 0 0 0 3px var(--bee1-chat-accent-shadow, rgba(37, 211, 102, 0.3)) !important;
  color: var(--bee1-chat-text, #e2e8f0) !important;
  -webkit-text-fill-color: var(--bee1-chat-text, #e2e8f0) !important;
  background: var(--bee1-chat-surface, #2a2d35) !important;
  background-color: var(--bee1-chat-surface, #2a2d35) !important;
}

/* Autofill (Chrome) can force black text on dark fields */
#bee1-chat-window .bee1-chat-input:-webkit-autofill,
#bee1-chat-window .bee1-chat-textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--bee1-chat-text, #e2e8f0) !important;
  caret-color: var(--bee1-chat-accent, #25D366) !important;
  box-shadow: 0 0 0 1000px var(--bee1-chat-surface, #2a2d35) inset !important;
  transition: background-color 99999s ease-in-out 0s;
}

.bee1-input-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.bee1-chat-skip {
  padding: 10px 18px;
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 10px;
  font-size: 13px;
  color: var(--bee1-chat-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.bee1-chat-skip:hover {
  background: rgba(255,255,255,0.12);
  color: var(--bee1-chat-text);
}

/*
 * Send button — same as cosmetixe production (2.1.x):
 * header gradient background + Telegram plane as WHITE STROKE (fill:none).
 * Filling that path makes the icon disappear; stroke is required.
 */
#bee1-chat-window .bee1-chat-send,
#bee1-chat-window button.bee1-chat-send,
#bee1-chat-window #bee1-send-btn,
.bee1-chat-send,
button.bee1-chat-send,
#bee1-send-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 !important;
  background: var(--bee1-chat-send-bg, var(--bee1-chat-header-bg, #25D366)) !important;
  border: none !important;
  border-radius: 12px;
  color: #ffffff !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 12px var(--bee1-chat-accent-shadow, rgba(0, 0, 0, 0.25));
  flex-shrink: 0;
  line-height: 0;
  overflow: visible;
  -webkit-appearance: none;
  appearance: none;
}

#bee1-chat-window .bee1-chat-send svg,
#bee1-chat-window #bee1-send-btn svg,
#bee1-chat-window .bee1-send-icon,
.bee1-chat-send svg,
#bee1-send-btn svg,
.bee1-chat-send .bee1-send-icon,
#bee1-send-btn .bee1-send-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  display: block !important;
  pointer-events: none;
  overflow: visible !important;
  color: #ffffff !important;
  fill: none !important;
  stroke: #ffffff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#bee1-chat-window .bee1-chat-send svg path,
#bee1-chat-window #bee1-send-btn svg path,
#bee1-chat-window .bee1-send-icon path,
.bee1-chat-send svg path,
#bee1-send-btn svg path,
.bee1-chat-send .bee1-send-icon path,
#bee1-send-btn .bee1-send-icon path {
  fill: none !important;
  stroke: #ffffff !important;
  stroke-width: 1.75 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#bee1-chat-window .bee1-chat-send:hover,
#bee1-send-btn:hover,
.bee1-chat-send:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px var(--bee1-chat-accent-shadow, rgba(0, 0, 0, 0.3));
}

#bee1-chat-window .bee1-chat-send:active,
#bee1-send-btn:active,
.bee1-chat-send:active {
  transform: scale(0.95);
}

/* ========== Product cards (Chatpod-style smart search) ========== */
.bee1-product-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-height: 380px;
  overflow-y: auto;
  padding: 2px 0 4px;
}

.bee1-prod-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bee1-chat-surface, #2a2d35);
  border: 1px solid var(--bee1-chat-btn-border, rgba(255,255,255,0.12));
  border-radius: 12px;
  padding: 10px;
}

.bee1-prod-card.is-board {
  border-color: rgba(96, 165, 250, 0.35);
}

.bee1-prod-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.bee1-prod-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.bee1-prod-info {
  min-width: 0;
  flex: 1;
}

.bee1-prod-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--bee1-chat-text, #e2e8f0);
  line-height: 1.3;
}

.bee1-prod-conf {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  vertical-align: middle;
  margin-inline-start: 4px;
}

.bee1-prod-conf.high {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.bee1-prod-conf.low {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
}

.bee1-prod-pitch {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.78);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bee1-prod-features {
  margin: 6px 0 0;
  padding: 0 1em 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.72);
}

.bee1-prod-features li {
  margin-bottom: 2px;
}

.bee1-prod-price {
  font-size: 12px;
  margin-top: 6px;
  color: var(--bee1-chat-accent, #25D366);
  font-weight: 600;
}

.bee1-prod-stock.out {
  color: #f87171;
  font-weight: 500;
  margin-inline-start: 6px;
}

.bee1-prod-pick {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bee1-chat-header-bg, linear-gradient(135deg, #25D366 0%, #128C7E 100%));
  color: #fff;
}

.bee1-prod-pick:hover {
  filter: brightness(1.06);
}

.bee1-prod-card.is-board .bee1-prod-pick {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

/* Category chips (welcome) */
.bee1-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.bee1-cat-chip {
  border: 1.5px solid var(--bee1-chat-btn-border, rgba(255,255,255,0.15));
  background: var(--bee1-chat-btn-bg, #3a404c);
  color: var(--bee1-chat-btn-text, #f8fafc);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.bee1-cat-chip:hover {
  border-color: var(--bee1-chat-accent, #25D366);
  transform: translateY(-1px);
}

.bee1-prod-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--bee1-chat-text, #e2e8f0);
  margin: 10px 0 8px;
  opacity: 0.95;
}

.bee1-suggest-block {
  margin-top: 8px;
  width: 100%;
}

/* ========== Complete State ========== */
.bee1-chat-complete {
  text-align: center;
}

.bee1-chat-restart {
  padding: 14px 28px;
  background: var(--bee1-chat-header-bg);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 16px var(--bee1-chat-accent-shadow);
}

.bee1-chat-restart:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--bee1-chat-accent-shadow);
}

/* ========== Progress Steps ========== */
.bee1-chat-progress {
  display: flex;
  gap: 4px;
  padding: 0 20px 12px;
  background: var(--bee1-chat-bg);
}

.bee1-progress-step {
  flex: 1;
  height: 3px;
  background: var(--bee1-chat-progress-bg);
  border-radius: 2px;
  transition: background 0.4s ease;
}

.bee1-progress-step.active {
  background: var(--bee1-chat-progress-active);
}

.bee1-progress-step.done {
  background: var(--bee1-chat-progress-done);
}

/* ========== Footer ========== */
.bee1-chat-footer {
  padding: 8px 20px;
  text-align: center;
  font-size: 10px;
  color: var(--bee1-chat-footer-text);
  background: var(--bee1-chat-bg);
}

/* ========== Mobile ========== */
@media (max-width: 480px) {
  #bee1-chat-window {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - 24px);
    height: auto;
    /* Clear sticky site footers / payment bars — not under footer */
    bottom: max(72px, calc(12px + env(safe-area-inset-bottom, 0px))) !important;
    right: 8px !important;
    left: 8px !important;
    margin: 0 auto;
    border-radius: 16px;
    z-index: 2147483000 !important;
  }

  .bee1-chat-messages {
    flex: 0 1 auto;
    max-height: 45vh;
    min-height: 80px;
    overflow-y: auto;
    padding: 16px 14px;
  }

  .bee1-chat-buttons {
    flex-direction: column;
  }

  .bee1-chat-btn {
    min-width: 100%;
  }

  /* Keep input + send button always side-by-side on mobile */
  .bee1-chat-input-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
  }

  .bee1-chat-input-row .bee1-chat-input {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  .bee1-chat-input-row .bee1-chat-send {
    flex-shrink: 0 !important;
    width: 44px !important;
    min-width: 44px;
    height: 44px !important;
  }

  .bee1-chat-input-area {
    padding: 12px 12px 16px;
  }

  /* Textarea wrapper — keep send accessible on mobile */
  .bee1-chat-input-wrapper .bee1-input-actions {
    justify-content: space-between;
  }

  .bee1-chat-textarea {
    font-size: 16px; /* prevents iOS zoom */
  }
}

/* ========== RTL Fine-tuning ========== */
[dir="rtl"] #bee1-chat-window,
#bee1-chat-window {
  direction: rtl;
  text-align: right;
}

/* Prevent RTL from flipping the window position */
[dir="rtl"] #bee1-chat-window {
  right: 10px !important;
  left: auto !important;
}

@media (max-width: 480px) {
  [dir="rtl"] #bee1-chat-window {
    right: 8px !important;
    left: 8px !important;
  }
}

[dir="rtl"] .bee1-message-bot .bee1-message-text {
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 6px;
}

[dir="rtl"] .bee1-message-user .bee1-message-text {
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 6px;
  margin-right: 0;
  margin-left: auto;
}
