/* ========================================
   スタンドアロンページ専用スタイル
   直リンクでアクセスした場合の表示
   全領域を自然な高さで広げ、内部スクロールを発生させない
   ======================================== */

body.gr-standalone {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #e8f4fd 0%, #dce8f0 50%, #c8dce8 100%);
  font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* --- ウィジェット全体をセンタリング --- */
#gr-chatbot-widget.standalone-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 480px;
  padding: 16px 16px 12px;
  box-sizing: border-box;
}

/* --- ページ上部：ロゴ画像 --- */
.standalone-header {
  text-align: center;
  margin-bottom: 12px;
}

.standalone-logo-img {
  width: 220px;
  height: auto;
  margin-bottom: 4px;
}

.standalone-subtitle {
  font-size: 14px;
  color: #1a3a5c;
  font-weight: bold;
  letter-spacing: 1px;
}

/* --- チャット本体：自然な高さで広がる --- */
#gr-chatbot-widget.standalone-mode #chatbot-container.standalone-chat {
  position: static;
  width: 100%;
  height: auto;
  max-width: 480px;
  max-height: none;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* メッセージ領域：内部スクロール無効、自然に伸びる */
#gr-chatbot-widget.standalone-mode #chatbot-messages {
  flex: 0 0 auto;
  overflow-y: visible;
  max-height: none;
}

/* 選択肢領域：内部スクロール無効、全選択肢を表示 */
#gr-chatbot-widget.standalone-mode #chatbot-options {
  flex: 0 0 auto;
  max-height: none;
  overflow-y: visible;
  padding: 8px 16px;
}

/* 閉じるボタン非表示 */
#gr-chatbot-widget.standalone-mode #chatbot-close {
  display: none;
}

/* トリガー非表示 */
#gr-chatbot-widget.standalone-mode #chatbot-trigger {
  display: none;
}

/* --- フッター --- */
.standalone-footer {
  margin-top: 12px;
  font-size: 12px;
  color: #8a9baa;
  text-align: center;
}

/* --- スマホ：同じく内部スクロールなし --- */
@media (max-width: 520px) {
  #gr-chatbot-widget.standalone-mode {
    padding: 10px 8px;
  }

  .standalone-logo-img {
    width: 180px;
  }

  .standalone-subtitle {
    font-size: 13px;
  }

  #gr-chatbot-widget.standalone-mode #chatbot-container.standalone-chat {
    border-radius: 12px;
  }
}
