/* =========================
   Sano AI Concierge – Unified Style
   ========================= */
:root{
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --radius: 12px;
  --space: 12px;
  --space-lg: 18px;
  --shadow: 0 6px 24px rgba(0,0,0,.08);

  /* カラーパレット */
  --bg: #ffffff;          /* ページ背景は白 */
  --card: #ffffff;
  --text: #222;
  --sub: #666;
  --line: #e5e7eb;

  --brand: #0d6efd;       /* ボタン色 */
  --brand-weak: #eef2ff;  /* 自分の吹き出し */
  --bot-weak: #f3f4f6;    /* Botの吹き出し */
  --danger: #c0392b;
  --link: #0b5ed7;
}

*{ box-sizing: border-box; }
html,body{
  margin:0; padding:0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

/* 共通レイアウト */
.sano-box{
  max-width: 760px;
  margin: 0 auto var(--space-lg);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
}
.sano-box h3{
  margin: 0 0 6px;
  text-align: center;
  color: #2b2b2b;
  font-weight: 700;
}
.sano-box p.sub{
  margin: 0 0 var(--space);
  text-align: center;
  color: var(--sub);
}

/* 入力欄とボタン */
.sano-row{
  display: flex;
  gap: var(--space);
  align-items: stretch;
}
.sano-row textarea{
  flex: 1;
  width: 100%;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 16px;
  resize: vertical;
  background: #fff;
}
.sano-row button{
  min-width: 104px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .02s ease, filter .15s ease;
}
.sano-row button:hover{ filter: brightness(1.04); }
.sano-row button:active{ transform: translateY(1px); }

/* ヒント */
.hint{ 
  color: var(--sub);
  font-size: 12px;
  margin: 6px 2px 0;
  text-align: center; /* 中央揃えで統一 */
}

/* よくある質問 */
.faq-examples{
  margin-top: 18px;
  font-size: 15px;
}
.faq-examples h4{
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}
.faq-examples ul{
  list-style: none;
  padding: 0;
  margin: 0;
}
.faq-examples li{ margin: 6px 0; }
.faq-examples a{
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}
.faq-examples a:hover{
  text-decoration: underline;
  color: #084298;
}

/* 注意事項 */
.notice-box{
  margin-top: 20px;
  padding: 12px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--sub);
}
.notice-box ul{
  margin: 0;
  padding-left: 18px;
}

/* 子ページ専用：チャットログ */
.chat-log{
  height: min(60vh, 560px);
  min-height: 320px;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-lg);
}
.row{ display:flex; margin: 10px 0; }
.row.me{ justify-content: flex-end; }
.row.bot{ justify-content: flex-start; }
.bubble{
  max-width: 92%;
  border-radius: var(--radius);
  padding: 10px 12px;
  line-height: 1.7;
  background: var(--brand-weak);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  white-space: pre-wrap;
}
.row.bot .bubble{ background: var(--bot-weak); }

/* 音声入力ボタン */
.mic-btn {
  background: transparent !important;  /* 背景透過 */
  border: none !important;             /* 枠線なし */
  display: flex;
  flex-direction: column;              /* アイコンの下にテキスト */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
  min-width: 64px;                     /* ボタン幅をやや広めに確保 */
}

.mic-icon {
  font-size: 28px;                     /* アイコンを大きく */
  line-height: 1;
}

.mic-label {
  font-size: 11px;                     /* 小さめの補助テキスト */
  color: var(--sub);                   /* グレー系で補助 */
  margin-top: 2px;
}

.mic-btn:hover .mic-icon {
  color: var(--brand);                 /* ホバー時はブランド色 */
}

/* 入力欄とマイクをまとめる */
.input-wrapper {
  position: relative;
  flex: 1;
}

.input-wrapper textarea {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 44px 12px 12px; /* 右側に余白を確保（マイク用） */
  font-size: 16px;
  resize: vertical;
  background: #fff;
}

/* マイクボタンを入力欄の中に配置 */
.mic-inline {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important; /* 青背景を打ち消す */
  border: none !important;
  cursor: pointer;
  font-size: 22px;
  color: var(--sub);
  padding: 0;
  min-width: auto; /* 共通ボタン幅の継承を防ぐ */
}

.mic-inline:hover {
  color: var(--brand);
}

/* ウィジェット用 */
.sano-launcher textarea {
  min-height: 60px;
}
.sano-launcher button {
  width: 100%;
}