.ai-chat-teaser { display: none !important; }
/* ==========================================================================
   AI Concierge Luxury Widget Stylesheet — ocStore 3.x
   Aesthetic: High-end Boutique, Glassmorphism, Micro-animations & Micro-interactions
   ========================================================================== */

:root {
  --ai-primary: #1e293b;
  --ai-primary-dark: #0f172a;
  --ai-primary-light: #475569;
  --ai-primary-glow: rgba(30, 41, 59, 0.35);
  --ai-gold: #d97706;
  --ai-gold-light: #fbbf24;
  --ai-bg-glass: rgba(255, 255, 255, 0.95);
  --ai-card-bg: #ffffff;
  --ai-text-main: #0f172a;
  --ai-text-muted: #64748b;
  --ai-border: rgba(226, 232, 240, 0.85);
  --ai-shadow-window: 0 24px 60px -12px rgba(15, 23, 42, 0.22), 0 8px 24px -4px rgba(15, 23, 42, 0.1);
  --ai-shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 1px 4px rgba(15, 23, 42, 0.04);
  --ai-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#ai-chat-root {
  position: fixed;
  z-index: 999999;
  font-family: var(--ai-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ai-text-main);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

#ai-chat-root *, #ai-chat-root *::before, #ai-chat-root *::after {
  box-sizing: inherit;
}

/* Screen Positions */
.ai-chat-pos-bottom-right {
  bottom: 24px;
  right: 24px;
}

.ai-chat-pos-bottom-left {
  bottom: 24px;
  left: 24px;
}

/* ==========================================================================
   1. Floating Teaser Balloon (Piques curiosity)
   ========================================================================== */
.ai-chat-teaser {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 290px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  animation: ai-teaser-float 3s ease-in-out infinite, ai-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 10;
}

.ai-chat-pos-bottom-left .ai-chat-teaser {
  right: auto;
  left: 0;
}

.ai-chat-teaser:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.ai-chat-teaser-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
}

.ai-chat-teaser-sparkle {
  font-size: 16px;
  flex-shrink: 0;
}

.ai-chat-teaser-text {
  flex: 1;
  line-height: 1.35;
}

.ai-chat-teaser-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

.ai-chat-teaser-close:hover {
  color: #ef4444;
}

.ai-chat-teaser-arrow {
  position: absolute;
  bottom: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid rgba(226, 232, 240, 0.8);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transform: rotate(45deg);
}

.ai-chat-pos-bottom-left .ai-chat-teaser-arrow {
  right: auto;
  left: 24px;
}

@keyframes ai-teaser-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes ai-fade-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   2. Launcher Button with Radiant Halo
   ========================================================================== */
.ai-chat-launcher {
  pointer-events: auto !important;
  z-index: 10000001 !important;
  cursor: pointer !important;
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ai-chat-color, var(--ai-primary)), var(--ai-primary-dark));
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  outline: none;
}

.ai-chat-launcher:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 16px 36px var(--ai-primary-glow);
}

.ai-chat-halo {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ai-primary-glow) 0%, transparent 70%);
  animation: ai-halo-pulse 3s infinite ease-in-out;
  pointer-events: none;
  z-index: -1;
}

@keyframes ai-halo-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

.ai-chat-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-chat-launcher .ai-chat-icon-close {
  display: none;
}

#ai-chat-root.ai-chat-open .ai-chat-launcher .ai-chat-icon-open {
  display: none;
}

#ai-chat-root.ai-chat-open .ai-chat-launcher .ai-chat-icon-close {
  display: block;
}

#ai-chat-root.ai-chat-open .ai-chat-teaser {
  display: none !important;
}

/* Online Pulse Badge */
.ai-chat-launcher-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
}

.ai-chat-pulse {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 10px #10b981;
  animation: ai-pulse 2s infinite;
}

@keyframes ai-pulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   3. Chat Window (Luxury Glass Container)
   ========================================================================== */
.ai-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 110px);
  background: var(--ai-bg-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 24px;
  box-shadow: var(--ai-shadow-window);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  animation: ai-window-enter 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: bottom right;
}

.ai-chat-pos-bottom-left .ai-chat-window {
  right: auto;
  left: 0;
  transform-origin: bottom left;
}

#ai-chat-root.ai-chat-open .ai-chat-window {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 10000000 !important;
}

@keyframes ai-window-enter {
  from { opacity: 0; transform: translateY(20px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   4. Luxury Header
   ========================================================================== */
.ai-chat-header {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, var(--ai-chat-color, #047857) 100%);
  color: #ffffff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-chat-header-bg-glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

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

.ai-chat-avatar-wrap {
  position: relative;
}

.ai-chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #334155, #1e293b);
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fef08a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ai-chat-avatar-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0f172a;
}

.ai-chat-header-titles {
  display: flex;
  flex-direction: column;
}

.ai-chat-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.2px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-chat-badge-vip {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 7px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(217, 119, 6, 0.25));
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fef08a;
  border-radius: 12px;
}

.ai-chat-subtitle {
  font-size: 11.5px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.ai-chat-status-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

.ai-chat-header-actions {
  display: flex;
  gap: 6px;
}

.ai-chat-hbtn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ai-chat-hbtn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* ==========================================================================
   5. Messages Area & Bubbles
   ========================================================================== */
.ai-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  scroll-behavior: smooth;
}

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

.ai-chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  animation: ai-msg-appear 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ai-msg-appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.ai-msg-user {
  align-self: flex-end;
}

.ai-msg-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.5;
  word-wrap: break-word;
}

.ai-msg-bot .ai-msg-bubble {
  background: #ffffff;
  color: #1e293b;
  border-top-left-radius: 4px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.ai-msg-user .ai-msg-bubble {
  background: linear-gradient(135deg, var(--ai-chat-color, var(--ai-primary)), var(--ai-primary-dark));
  color: #ffffff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 14px var(--ai-primary-glow);
}

/* Welcome Card in Bubble */
.ai-msg-welcome .ai-welcome-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #047857;
  font-size: 13px;
  margin-bottom: 6px;
}

.ai-welcome-star {
  color: var(--ai-gold);
}

/* ==========================================================================
   6. Quick Category Chips
   ========================================================================== */
.ai-chat-chips-block {
  margin-top: 2px;
}

.ai-chat-chips-title {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.ai-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ai-chat-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ai-chip-icon {
  color: var(--ai-gold);
  font-size: 11px;
}

.ai-chat-chip:hover {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  border-color: #0f172a;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15);
}

/* ==========================================================================
   7. Interactive Boutique Product Cards
   ========================================================================== */
.ai-chat-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  width: 100%;
}

.ai-product-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  gap: 12px;
  box-shadow: var(--ai-shadow-card);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.2s ease;
  overflow: hidden;
  position: relative;
}

.ai-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.12);
  border-color: rgba(5, 150, 105, 0.4);
}

.ai-product-thumb-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f8fafc;
}

.ai-product-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ai-product-card:hover .ai-product-thumb {
  transform: scale(1.08);
}

.ai-product-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ai-product-name {
  font-weight: 600;
  font-size: 13.5px;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-product-name:hover {
  color: var(--ai-primary);
}

.ai-product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.ai-product-price {
  font-weight: 700;
  color: #0f172a;
  font-size: 15px;
  letter-spacing: -0.2px;
}

.ai-product-special {
  color: #dc2626;
  font-weight: 700;
  font-size: 15px;
}

.ai-product-oldprice {
  text-decoration: line-through;
  font-size: 12px;
  color: #94a3b8;
}

.ai-product-actions {
  display: flex;
  gap: 6px;
}

/* Shimmer Button */
.ai-btn-buy {
  position: relative;
  background: linear-gradient(135deg, var(--ai-chat-color, var(--ai-primary)), var(--ai-primary-dark));
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 8px var(--ai-primary-glow);
}

.ai-btn-buy::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: rotate(25deg);
  animation: ai-shimmer 3s infinite;
}

@keyframes ai-shimmer {
  0% { left: -60%; }
  30%, 100% { left: 140%; }
}

.ai-btn-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--ai-primary-glow);
}

.ai-btn-link {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}

.ai-btn-link:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ==========================================================================
   8. VIP Order Receipt Card
   ========================================================================== */
.ai-order-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1.5px dashed #34d399;
  border-radius: 16px;
  padding: 14px;
  margin-top: 8px;
  color: #065f46;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}

.ai-order-card-title {
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #047857;
}

.ai-order-details {
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #0f5132;
  border-top: 1px solid rgba(52, 211, 153, 0.4);
  padding-top: 8px;
}

.ai-order-total {
  font-weight: 800;
  font-size: 15px;
  color: #064e3b;
  margin-top: 4px;
}

/* ==========================================================================
   9. Monobank Titanium Payment Button
   ========================================================================== */
.ai-mono-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, #111827 0%, #000000 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  overflow: hidden;
}

.ai-mono-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}

.ai-mono-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  color: #ffffff;
}

/* ==========================================================================
   10. Typing Indicator
   ========================================================================== */
.ai-chat-typing {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.ai-typing-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.ai-typing-bubble {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 6px 10px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.ai-chat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ai-primary);
  animation: ai-bounce 1.4s infinite ease-in-out both;
}

.ai-chat-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-chat-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes ai-bounce {
  0%, 80%, 100% { transform: scale(0.3); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.ai-chat-typing-label {
  font-size: 11.5px;
  color: #64748b;
  font-style: italic;
}

/* ==========================================================================
   11. Footer Input & Concierge Note
   ========================================================================== */
.ai-chat-footer {
  flex-shrink: 0;
  padding: 12px 14px 10px;
  background: #ffffff;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  z-index: 5;
}

.ai-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 24px;
  padding: 4px 6px 4px 14px;
  transition: all 0.2s ease;
}

.ai-input-wrapper:focus-within {
  border-color: var(--ai-chat-color, var(--ai-primary));
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--ai-primary-glow);
}

.ai-chat-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px 0;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
  color: #0f172a;
}

.ai-chat-input::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.ai-chat-submit {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ai-chat-color, var(--ai-primary)), var(--ai-primary-dark));
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s;
  box-shadow: 0 2px 6px var(--ai-primary-glow);
}

.ai-chat-submit:hover {
  transform: scale(1.08);
}

.ai-chat-footer-note {
  text-align: center;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 6px;
  letter-spacing: 0.2px;
}

/* ==========================================================================
   12. Mobile Responsive (Flawless viewport handling)
   ========================================================================== */
@media (max-width: 768px) {
  #ai-chat-root.ai-chat-open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    z-index: 2147483647 !important;
    overflow: hidden !important;
  }

  #ai-chat-root.ai-chat-open .ai-chat-window {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    z-index: 2147483647 !important;
    box-shadow: none !important;
  }

  #ai-chat-root.ai-chat-open .ai-chat-launcher {
    display: none !important;
  }

  .ai-chat-header {
    flex-shrink: 0 !important;
    padding-top: max(14px, env(safe-area-inset-top, 14px)) !important;
    border-radius: 0 !important;
  }

  .ai-chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 14px 12px !important;
  }

  .ai-chat-footer {
    flex-shrink: 0 !important;
    position: relative !important;
    bottom: 0 !important;
    background: #ffffff !important;
    padding: 10px 12px max(12px, env(safe-area-inset-bottom, 12px)) !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
    border-top: 1px solid #e2e8f0 !important;
  }

  .ai-chat-input {
    font-size: 16px !important; /* Запобігає примусовому наближенню/зуму на iPhone Safari */
    height: 44px !important;
  }

  .ai-chat-submit {
    width: 40px !important;
    height: 40px !important;
  }

  .ai-chat-pos-bottom-right, .ai-chat-pos-bottom-left {
    bottom: 16px;
    right: 16px;
    left: auto;
  }
}

/* Telegram Escalation Card */
.ai-tg-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #7dd3fc;
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.08);
}

.ai-tg-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-tg-icon {
  font-size: 22px;
}

.ai-tg-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #0369a1;
}

.ai-tg-subtitle {
  font-size: 11.5px;
  color: #0284c7;
}

.ai-tg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0284c7;
  color: #ffffff;
  text-decoration: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  transition: all 0.15s ease;
}

.ai-tg-btn:hover {
  background: #0369a1;
  color: #ffffff;
  transform: translateY(-1px);
}
