.cf-chatbot-overlay{position:fixed;inset:0;background:transparent;display:none;z-index:2147483000;pointer-events:none}
/* 右下固定のポップアップ */
.cf-chatbot-dialog{position:fixed;right:16px;bottom:16px;width:min(520px,92vw);height:min(80vh,720px);background:#fff;border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,.35);overflow:hidden;border:1px solid rgba(0,0,0,.08);pointer-events:auto}
.cf-chatbot-close{position:absolute;top:8px;right:8px;border:none;background:#111827;color:#fff;width:32px;height:32px;border-radius:16px;cursor:pointer}
.cf-chatbot-close{display:none}
.cf-chatbot-overlay.cf-fallback .cf-chatbot-close{display:block}
.cf-chatbot-iframe{width:100%;height:100%;border:0;display:block}
/* Version beacon: custom-feature chat-modal.css */
.__dotcon_css_ver_custom_feature_chat_modal { --dotcon-css-ver: "1.0.0"; }
.cf-chatbot-open{display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:24px;background:#0ea5e9;border:none;color:#fff;cursor:pointer}
.cf-chatbot-open:hover{background:#0284c7}

/* 右下固定の標準FAB（トリガーが無いページ向け） */
.cf-chatbot-fab{position:fixed;right:16px;bottom:16px;z-index:2147483001;box-shadow:0 8px 24px rgba(0,0,0,.25)}
#cf-chat-fallback{display:none !important}

/* 擬似ページ遷移モード（モバイル時に下地を完全に隠す） */
html.cf-route-active, html.cf-route-active body{height:100%; overflow:hidden !important;}
html.cf-route-active body > *:not(.cf-chatbot-overlay){display:none !important;}

@media (max-width: 767px){
  .cf-chatbot-dialog{right:12px;bottom:12px;width:min(92vw,520px);height:80vh;border-radius:10px}
  .cf-chatbot-close{top:8px;right:8px}
}

/* Mobile full-screen modal variant */
.cf-chatbot-overlay.cf-mobile{background:rgba(0,0,0,.45);pointer-events:auto}
/*
  モバイル全画面: 100vh でアドレスバー分がはみ出す端末(iOS Safari等)に対応。
  - 位置はレイアウトビューポート基準で固定（top/left/width）。
  - 高さのみ VisualViewport に追従してジャンプを抑制。
  - safe-area を考慮して上下左右に余白を確保。
*/
.cf-chatbot-overlay.cf-mobile .cf-chatbot-dialog{
  position:fixed;
  /* 全面化して“外側”を無くす（外タップで閉じない） */
  inset:0;
  /* 幅のはみ出し防止（PC用の min(520px,92vw) を上書き） */
  width:auto !important;
  max-width:none !important;
  left:0; right:0;
  /* モーダル自体は常に全画面（可視高変動で縮めない） */
  height:100dvh;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top, 0);
  padding-bottom:env(safe-area-inset-bottom, 0);
  padding-left:env(safe-area-inset-left, 0);
  padding-right:env(safe-area-inset-right, 0);
  border-radius:0;box-shadow:none;border:0;animation:cf-slide-up .18s ease-out;
  /* レイアウトの再計算を局所化してチラつき抑制 */
  contain:layout paint size;
  will-change:height;
  overflow:hidden;
}
/* モバイルでも iframe は常に全高。入力欄の追従は iframe 内で行う */
.cf-chatbot-overlay.cf-mobile .cf-chatbot-iframe{ height:100%; }
/* VisualViewport変動中はアニメーションを抑制（小刻みな再実行を防ぐ） */
html.cf-vv-resizing .cf-chatbot-overlay.cf-mobile .cf-chatbot-dialog{animation:none!important}
@keyframes cf-slide-up{from{transform:translateY(16px);opacity:.98}to{transform:translateY(0);opacity:1}}

/* 強制クリック有効化（テーマCSSにより無効化されている対策） */
#fab-chat{pointer-events:auto !important; cursor:pointer !important;}
#fab-chat img,#fab-chat span{pointer-events:none;}

/* ホットスポット（最終手段） */
.cf-chatbot-hotspot{background:transparent;border:0;position:absolute;z-index:2147483002;pointer-events:auto}
