/* D751: Hide chat widget auto-open on mobile (< 768px)
 * HIGH SPECIFICITY override (html body prefix + !important)
 */
@media (max-width: 768px) {
  /* MUST WIN over base CSS that sets .open { display: flex; } */
  html body div#wevia-chat-overlay,
  html body div#wevia-chat-overlay.open,
  html body iframe[src*="wevia-widget"],
  html body iframe[src*="wevia-avatar-public.html?widget"],
  html body div[class*="chat-iframe-container"],
  html body div[id*="chat-iframe"],
  html body .chat-window-mobile,
  html body #chat-widget-iframe-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  
  /* D848: allow manual tap-open; only block auto-open (no .d710-open class) */
  html body:not(.d710-open) #d710-pop {
    display: none !important;
  }
  html body.d710-open #d710-pop {
    display: block !important;
  }
  
  html body.d710-open, html body.chat-open {
    overflow: auto !important;
  }
}

/* Make chat-toggle-btn smaller on mobile */
@media (max-width: 480px) {
  html body .chat-toggle-btn,
  html body button[class*="chat-toggle"] {
    width: 48px !important;
    height: 48px !important;
    bottom: 80px !important;
    right: 12px !important;
  }
}
