/* =====================================================
   THE YOKOHAMA FRONT CLINIC MALL テーマ設定
   新クリニック展開時は :root の変数を変更するだけで
   基本デザインを切り替えられます
   ===================================================== */

:root {
  /* ── クリニックカラー ── */
  --color-primary:        #98E6E6;
  --color-primary-hover:  #7dd4d4;
  --color-user-bubble:    #BCA26E;

  /* ── テキスト ── */
  --color-text-main:      #525252;
  --color-accent:         #0E1E49;

  /* ── 区切り線 ── */
  --color-divider-light:  #fff;
  --color-divider-subtle: #dcdaf3;

  /* ── リンクボタン ── */
  --color-link-btn:       #ffffff;
  --color-link-btn-hover: #f5f0eb;

  /* ── 背景 ── */
  --color-bg: rgba(242, 241, 249, 0.9);
  --color-notes-text: #6b7280;

  /* ── フォント ── */
  --font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-size-base: 15px;

  /* ── シェイプ ── */
  --radius-bubble: 30px;
  --radius-app:    26px;
  --spacing-chat:  12px;

  /* ── ランチャーグラデーション（変更する場合は3色セットで） ── */
  --launcher-grad:       linear-gradient(135deg, #BCA26E 0%, #9d825a 42%, #7d6345 100%);
  --launcher-grad-hover: linear-gradient(135deg, #a08a5e 0%, #846e4c 42%, #6a543b 100%);
}

/* ═══════════════════════════════════════════════════
   チャットウィンドウ
═══════════════════════════════════════════════════ */
.app {
  background:
    radial-gradient(ellipse at 15% 20%, rgba(220, 225, 247, 0.45) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 35%, rgba(201, 208, 232, 0.45) 0%, transparent 60%),
    radial-gradient(ellipse at 45% 85%, rgba(235, 237, 254, 0.45) 0%, transparent 60%),
    rgba(235, 237, 254, 0.45);
  border-radius: var(--radius-app);
  border: 1px solid rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  overflow: hidden;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.28)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.14));
}

/* ═══════════════════════════════════════════════════
   ヘッダー
═══════════════════════════════════════════════════ */
.header {
  background: transparent;
  border-bottom: 1px solid var(--color-divider-light);
  box-shadow: 0 1px 0 0 var(--color-divider-subtle);
  position: relative;
  flex-direction: column;
  align-items: center;
  padding: 20px 48px;
}
.title {
  flex: none;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: var(--color-accent);
}
.subtitle {
  font-size: 16px;
  text-align: center;
  color: var(--color-accent);
}

/* 閉じるボタン（右上） */
.minimize-btn {
  position: absolute;
  top: 50%;
  right: var(--spacing-chat);
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 5px;
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  transition: background 0.2s, border-color 0.2s;
}
.minimize-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.35) 0%, rgba(208,214,235,0.35) 100%);
  border: 1px solid var(--color-divider-subtle);
}

/* ═══════════════════════════════════════════════════
   チャットエリア・吹き出し
═══════════════════════════════════════════════════ */
.chat,
.bubble,
.bot-heading,
.bot-conclusion,
.bot-content,
.bot-notes {
  color: var(--color-text-main);
}

.chat .msg.bot:first-child .bubble {
  font-weight: 700;
  color: var(--color-text-main);
}

/* 吹き出し共通 */
.bubble {
  corner-shape: squircle;
}

/* ボット吹き出し */
.msg.bot .bubble {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-size: 16px;
}

/* ユーザー吹き出し */
.msg.user .bubble {
  font-size: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* 見出し・本文サイズ */
.bot-heading {
  font-size: 22px;
  font-weight: 700;
}
.bot-conclusion {
  font-size: 16px;
  font-weight: 400;
}
.bot-content li {
  font-size: 16px;
}
.bot-content-toggle {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-main);
}
.bot-content-toggle::after {
  color: var(--color-user-bubble);
  font-weight: 700;
}
.bot-notes {
  font-size: 16px;
}
.bot-notes li::before {
  content: "🗒️ ";
}

/* 関連リンクセクション */
.bot-section-label {
  font-size: 16px;
}
.bot-links-block .bot-section-label {
  font-weight: 700;
  color: var(--color-text-main);
  border-bottom: 1px solid var(--color-divider-light);
  box-shadow: 0 1px 0 0 var(--color-divider-subtle);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

/* content インラインリンク */
.content-link {
  color: var(--color-text-main);
  border: 1px solid var(--color-text-main);
}
.content-link:hover {
  background: var(--color-primary);
  color: var(--color-accent);
}

/* 関連リンクボタン */
.chat-btn {
  background: #fff;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  font-size: 13px;
  font-weight: 400;
  padding: 7px 10px;
  transition: background 0.3s ease, color 0.3s ease;
}
.chat-btn:hover {
  background: var(--color-accent);
  color: #fff;
  filter: none;
}
.chat-btn::after {
  color: inherit;
}

/* ═══════════════════════════════════════════════════
   入力エリア（composer）
═══════════════════════════════════════════════════ */
.composer {
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid var(--color-divider-light);
  box-shadow: 0 -1px 0 0 var(--color-divider-subtle), 0 -6px 18px rgba(0, 0, 0, 0.08);
}
.composer input {
  background: #ffffff;
  border-color: #d1d5db;
  border-radius: var(--radius-bubble);
  corner-shape: squircle;
}
.composer input::placeholder {
  color: #9ca3af;
}

/* 送信ボタン */
.composer button {
  background: var(--color-user-bubble);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-bubble);
  corner-shape: squircle;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.composer button.is-empty {
  background: var(--color-user-bubble);
  color: #fff;
  box-shadow: none;
}
.composer button:not(.is-empty) {
  background: var(--launcher-grad);
  color: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}
.composer button:not(.is-empty):hover {
  background: var(--launcher-grad-hover);
}
.composer button:disabled {
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════
   フッター
═══════════════════════════════════════════════════ */
.footer {
  position: relative;
  text-align: center;
  padding-right: 60px;
  border-top: 1px solid var(--color-divider-light);
  box-shadow: 0 -1px 0 0 var(--color-divider-subtle);
}
.footer small {
  display: block;
  text-align: center;
}
.footer-links {
  justify-content: center;
}

/* 閉じるボタン（右下） */
.footer-minimize-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: var(--spacing-chat);
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 5px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-accent);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.footer-minimize-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.35) 0%, rgba(208,214,235,0.35) 100%);
  border: 1px solid var(--color-divider-subtle);
}
.footer-minimize-icon { display: flex; align-items: center; }
.footer-minimize-label { display: none; }

/* ═══════════════════════════════════════════════════
   ランチャーボタン（「ご用件をどうぞ」吹き出し）
═══════════════════════════════════════════════════ */
@keyframes launcherFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-launcher {
  animation: launcherFadeIn 0.25s ease both;
  corner-shape: squircle;
  border-radius: 40px;
  padding: 15px 12px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  background: var(--launcher-grad);
  color: #fff;
  border: 3px solid var(--color-user-bubble);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s ease, background 0.3s ease;
  transform-origin: bottom right;
}
.chat-launcher:hover {
  background: var(--launcher-grad-hover);
  transform: scale(1.06);
}
.chat-launcher::after {
  content: "";
  position: absolute;
  bottom: -12px;
  right: 14px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 4px solid transparent;
  border-top: 11px solid var(--color-user-bubble);
}

/* ═══════════════════════════════════════════════════
   モバイル調整（html.mobile-mode 付与時のみ適用）
   ※ white-space: nowrap / min-width は shared/style.css 側で定義済み
═══════════════════════════════════════════════════ */
html.mobile-mode .app          { border-radius: 0; }
html.mobile-mode .title        { font-size: 17px; }
html.mobile-mode .subtitle     { font-size: 13px; }
html.mobile-mode .msg.bot .bubble,
html.mobile-mode .msg.user .bubble { font-size: 12px; }
html.mobile-mode .bot-heading      { font-size: 16px; }
html.mobile-mode .bot-conclusion   { font-size: 12px; }
html.mobile-mode .bot-content li   { font-size: 12px; }
html.mobile-mode .bot-notes        { font-size: 12px; }
html.mobile-mode .bot-links-block .bot-section-label { font-size: 12px; }
html.mobile-mode .chat-launcher    { font-size: 14px; }
html.mobile-mode .composer input {
  font-size: 12px;
  padding: 7px 10px;
}
html.mobile-mode .composer button {
  font-size: 12px;
  padding: 7px 10px;
}
html.mobile-mode .minimize-btn {
  top: 3px;
  right: 12px;
  transform: none;
}
html.mobile-mode .footer-minimize-btn {
  top: 50%;
  bottom: auto;
  right: 12px;
  transform: translateY(-50%);
}
