/* ==========================================================================
   KNET AI Chat - 今井技巧さんサイト用カスタムCSS（ヘッダー・フッダー配色調整 & ボタン視認性向上版）
   設置場所: wp-content/themes/arisaka-stone/knet-ai-chat/custom.css
   ========================================================================== */

/* ----- 配色・形（CSS変数の上書き） ----- */
.kc-chat-widget {
  --kc-primary: #0F5828;
  --kc-primary-dark: #0A3C1B;
  --kc-bg: #0F5828;
  --kc-header-bg: #1B6E38;           /* ヘッダーを少し薄め・明るめの緑色に設定 */
  --kc-header-color: white;
  --kc-user-bubble-bg: #0F5828;
  --kc-user-bubble-color: white;
  --kc-footer-color: #ddd;
  --kc-button-radius: 0;
  --kc-mobile-bottom: 80px;
  --kc-bubble-size:120px;
}
/* チャット枠自体の拡大 */
.kc-chat-widget .kc-chat {
  width: 440px;
  max-width: 92vw;
  height: 680px;
  max-height: 85vh;
}

/* 中身のメッセージ表示エリアを枠に合わせて広げる */
.kc-chat-widget .kc-chat__body,
.kc-chat-widget .kc-chat__messages {
  max-height: none;
  height: 100%;
}

/* 吹き出し・中身の横幅を枠いっぱいに使う */
.kc-chat-widget .kc-msg__bubble {
  max-width: 100%;
  width: 100%;
}
.kc-chat-widget .kc-msg__content .kcq-answer {
  color: #AF011C;
}
.kc-chat-widget .kc-chat__messages{
	font-size:12px;
}
.kc-chat-widget .kc-chat__footer-note{
	font-size:12px;
}
.kc-chat-widget .kc-chat__tooltip {
  max-width: 15em; 
}
@media(645px > width){
	.kc-chat-widget .kc-chat__tooltip{
		bottom:calc(var(--kc-tooltip-bottom) + 40px);
	}
}

/* ヘッダー部分の背景色（薄い色） */
.kc-chat-widget .kc-chat__header {
  background-color: var(--kc-header-bg);
}

/* ウィンドウが開いた時のメイン背景 */
.kc-chat-widget .kc-chat__bubble.is-visible.is-open {
  background-color: #0F5828;
}
/* ----- メッセージ本文 ----- */
.kc-chat-widget .kc-msg__bubble {
  width: 100%;
}
.kc-chat-widget .kc-msg__content {
  display: block;
  font-weight: bold;
  font-size: clamp(14px, 0.67rem + 0.44vw, 18px);
}
.kc-chat-widget .kc-chat{
	width:60rem;
	height:80rem;
}
.kc-chat-widget .kc-chat.is-expanded {
    width: min(720px, calc(100vw - 40px));
    height: 75vh;
}
.kc-chat-widget .kc-msg__content button {
font-weight:bold;
}
.kc-chat-widget .kc-chat{
bottom: 48px;
}

/* 1. スマートフォン・タブレット（幅745px以下） */
@media screen and (max-width: 745px) {
  .kc-chat-widget {
    --kc-bubble-size: 90px;
  }
  .kc-chat-widget .kc-chat__bubble {
    right: 16px;
    bottom: 120px;
  }
	.kc-chat-widget .kc-chat__tooltip {
    right: 10px;
    bottom: 220px;
font-size: 10px;
  padding: 0.5em 0.6em;
  border-radius: 10px;
  }
}
}


/* チャット本体：600px以下は固定ヘッダー64pxとフッター80pxの間を埋める */
@media screen and (max-width: 600px) {
  .kc-chat-widget {
    --kc-mobile-top: 64px;
    --kc-mobile-bottom: 80px;
  }
  .kc-chat-widget .kc-chat,
  .kc-chat-widget .kc-chat.is-expanded {
    left: 0;
    right: 0;
    top: var(--kc-mobile-top);
    bottom: var(--kc-mobile-bottom);
    width: 100%;
    height: calc(100dvh - var(--kc-mobile-top) - var(--kc-mobile-bottom));
    max-height: none;
    box-sizing: border-box;
  }
}

/* 2. 小さめのスマートフォン（幅380px以下：iPhone SEなど） */
@media screen and (max-width: 380px) {
  .kc-chat-widget .kc-chat__bubble {
    right: 8px;
    bottom: 120px;
  }
	.kc-chat-widget .kc-chat__tooltip {
    right: 10px;
    bottom: 220px;
		font-size: 10px;
  padding: 0.5em 0.6em;
  border-radius: 10px;
  }
}
}

/* 3. スマートフォン中位（幅381px 〜 400px） */
@media screen and (min-width: 381px) and (max-width: 400px) {
  .kc-chat-widget {
    --kc-bubble-size: 70px;
  }
  .kc-chat-widget .kc-chat__bubble {
    right: 8px;
    bottom: 120px;
  }
	.kc-chat-widget .kc-chat__tooltip {
    right: 10px;
    bottom: 220px;
		font-size: 10px;
  padding: 0.5em 0.6em;
  border-radius: 10px;
  }
}
}

/* 4. スマートフォン上位（幅401px 〜 450px） */
@media screen and (min-width: 401px) and (max-width: 450px) {
  .kc-chat-widget {
    --kc-bubble-size: 70px;
  }
  .kc-chat-widget .kc-chat__bubble {
    right: 8px;
    bottom: 120px;
  }
	.kc-chat-widget .kc-chat__tooltip {
    right: 10px;
    bottom: 220px;
		font-size: 10px;
  padding: 0.5em 0.6em;
  border-radius: 10px;
  }
}
}
