/* AI相談ウィジェット（疑似AI相談・LINE風チャットUI） */
/* 由来: gizi-ai-soudan-prototype.html のスタイルをそのまま移植。 */
/* 変数はサイト共通の :root と同名（--text, --gold 等）だが、 */
/* .ai-soudan-widget にスコープしているためサイト全体には影響しない。 */

.ai-soudan-widget{
  --line-primary:#06C755;
  --line-primary-dark:#05a648;
  --gold:#BC9448;
  --cream:#f3ead9;
  --line-green:#06C755;
  --line-green-dark:#05a648;
  --text:#454545;
  --border:#e3e7ea;
  --chat-bg:#7d9b76;
  --bot-bubble:#ffffff;
  font-family:'Hiragino Kaku Gothic ProN','ヒラギノ角ゴ ProN W3','Hiragino Sans','メイリオ',sans-serif;
  color:var(--text);
  line-height:1.6;
}
.ai-soudan-widget, .ai-soudan-widget *{box-sizing:border-box;margin:0;padding:0;}

.ai-soudan-widget .wrap{max-width:420px;margin:0 auto;}

/* ===== 起動前：LPに置くボタン想定 ===== */
.ai-soudan-widget .launcher{
  background:#2b3a3a;
  border-radius:14px;
  padding:26px 22px;
  text-align:center;
  color:#fff;
  margin-bottom:16px;
}
.ai-soudan-widget .launcher p.launcher-kicker{
  font-size:11px;
  letter-spacing:.12em;
  color:#8fd6a8;
  margin-bottom:10px;
  font-weight:bold;
}
.ai-soudan-widget .launcher h2{
  font-size:17px;
  margin-bottom:8px;
  font-weight:bold;
  line-height:1.5;
  color:#fff;
}
.ai-soudan-widget .launcher p.sub{
  font-size:12.5px;
  color:#aebac3;
  margin-bottom:18px;
}
.ai-soudan-widget .launcher-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  background:#fff;
  color:var(--line-primary);
  font-weight:bold;
  font-size:14.5px;
  padding:14px 0;
  border-radius:999px;
  border:none;
  cursor:pointer;
}
.ai-soudan-widget .launcher-btn:hover{opacity:.92;}
.ai-soudan-widget .launcher-btn .icon{
  width:18px;height:18px;border-radius:50%;
  background:#3aa860;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:10px;color:#fff;
}

/* ===== チャットフレーム ===== */
.ai-soudan-widget .chatframe{
  display:none;
  background:#fff;
  border-radius:16px;
  box-shadow:0 12px 32px rgba(31,46,62,.14);
  overflow:hidden;
  border:1px solid #e8eaec;
}
.ai-soudan-widget .chatframe.active{display:block;}

.ai-soudan-widget .chat-header{
  background:#fff;
  border-bottom:1px solid #eef0f2;
  padding:13px 16px;
  display:flex;
  align-items:center;
  gap:10px;
}
.ai-soudan-widget .avatar{
  width:34px;height:34px;border-radius:50%;
  background:var(--line-primary);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.ai-soudan-widget .avatar svg{width:18px;height:18px;}
.ai-soudan-widget .chat-header .who{flex:1;}
.ai-soudan-widget .chat-header .who .name{font-size:13.5px;font-weight:bold;color:var(--line-primary);}
.ai-soudan-widget .chat-header .who .status{font-size:11px;color:#8a9099;display:flex;align-items:center;gap:4px;margin-top:1px;}
.ai-soudan-widget .chat-header .who .status i{width:6px;height:6px;border-radius:50%;background:#3aa860;display:inline-block;}

.ai-soudan-widget .thread{
  padding:16px 14px;
  min-height:280px;
  max-height:440px;
  overflow-y:auto;
  background:#eef3ee;
}

.ai-soudan-widget .msg-row{display:flex;gap:8px;margin-bottom:14px;align-items:flex-end;}
.ai-soudan-widget .msg-row.user{flex-direction:row-reverse;}
.ai-soudan-widget .msg-row .mini-avatar{
  width:24px;height:24px;border-radius:50%;background:var(--line-primary);
  flex-shrink:0;display:flex;align-items:center;justify-content:center;
}
.ai-soudan-widget .msg-row .mini-avatar svg{width:13px;height:13px;}
.ai-soudan-widget .msg-bubble{
  max-width:78%;
  padding:10px 14px;
  font-size:13.5px;
  border-radius:16px;
}
.ai-soudan-widget .msg-row.bot .msg-bubble{
  background:#ffffff;
  border:1px solid #e2e8e3;
  color:#333;
  border-bottom-left-radius:4px;
}
.ai-soudan-widget .msg-row.user .msg-bubble{
  background:#06C755;
  color:#fff;
  border-bottom-right-radius:4px;
}

.ai-soudan-widget .chips-row{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:2px 0 16px 32px;
}
.ai-soudan-widget .chip{
  background:#fff;
  border:1.3px solid #d5dbde;
  color:#3c4247;
  font-size:12.5px;
  padding:8px 14px;
  border-radius:999px;
  cursor:pointer;
  transition:.15s;
}
.ai-soudan-widget .chip:hover{background:#f4f6f5;border-color:#b9c2c5;}
.ai-soudan-widget .chip.quiet{
  border-color:var(--border);
  color:#8a9099;
}
.ai-soudan-widget .chip.quiet:hover{background:#f3f3f3;color:#8a9099;}
.ai-soudan-widget .chip.cta{
  border-color:#3aa860;
  background:#3aa860;
  color:#fff;
  font-weight:bold;
}
.ai-soudan-widget .chip.cta:hover{background:#2f8a4e;}

.ai-soudan-widget .fake-inputbar{
  border-top:1px solid #eef0f2;
  padding:10px 12px;
  display:flex;
  align-items:center;
  gap:8px;
}
.ai-soudan-widget .fake-inputbar .field{
  flex:1;
  background:#f5f7f5;
  border:1px solid #e2e8e3;
  border-radius:999px;
  padding:9px 14px;
  font-size:12.5px;
  color:#aab0b6;
}
.ai-soudan-widget .fake-inputbar .send{
  width:32px;height:32px;border-radius:50%;
  background:#e5e8eb;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}

.ai-soudan-widget .exit-note{
  font-size:12px;color:#999;margin:4px 0 4px 32px;
}
