/* ガラスのデパート AIチャット（見た目はLINEのトーク画面に寄せている） */

.gdchat{
  --gd-green:#007966;
  --gd-talk-bg:#8cabd8;
  --gd-head:#007966;
  --gd-me:#8de055;
  --gd-send:#06c755;
  --gd-ink:#111;
  --gd-line:#e6e1d3;
  font-family:'Hiragino Kaku Gothic ProN','Zen Kaku Gothic New',sans-serif;
  color:var(--gd-ink);
}

/* ===== 開くボタン（本物のLINEボタンと紛れないよう、サイトの色のまま） ===== */
.gdchat-launch{
  position:fixed;left:24px;bottom:24px;z-index:850;
  display:flex;align-items:center;gap:10px;
  padding:6px 22px 6px 6px;
  background:#fff;border:1px solid var(--gd-green);border-radius:999px;
  cursor:pointer;transition:background .2s;
}
.gdchat-launch:hover{background:#f6f8f4}
.gdchat-launch-ico{width:44px;height:44px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;background:var(--gd-green)}
.gdchat-launch-face{width:44px;height:44px;border-radius:50%;object-fit:cover;flex:none;display:block;background:#f2efe6}
.gdchat-launch-txt{display:flex;flex-direction:column;align-items:flex-start;line-height:1.3;text-align:left}
.gdchat-launch-txt b{font-weight:700;font-size:16px;line-height:1.3;color:var(--gd-green)}
.gdchat-launch-txt small{font-weight:500;font-size:13px;line-height:1.4;color:var(--gd-ink)}
.gdchat[data-open="1"] .gdchat-launch{display:none}

/* ===== 本体 ===== */
.gdchat-panel{
  position:fixed;left:24px;bottom:24px;z-index:851;
  width:380px;max-width:calc(100vw - 32px);
  height:min(640px,calc(100vh - 100px));
  display:flex;flex-direction:column;
  background:var(--gd-talk-bg);border:1px solid var(--gd-head);border-radius:16px;
  overflow:hidden;
}
.gdchat-panel[hidden]{display:none}

/* トーク画面の上の帯 */
.gdchat-head{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px 10px 14px;background:var(--gd-head);color:#fff;flex:none;
}
.gdchat-head-face{width:34px;height:34px;border-radius:50%;object-fit:cover;flex:none;display:block;background:#fff}
.gdchat-head-txt{flex:1;min-width:0;line-height:1.3}
.gdchat-head-txt b{display:block;font-weight:700;font-size:16px;line-height:1.3;color:#fff}
.gdchat-head-txt small{display:block;font-weight:500;font-size:12px;line-height:1.4;color:#fff}
.gdchat-close{
  flex:none;width:34px;height:34px;display:flex;align-items:center;justify-content:center;
  background:transparent;border:0;border-radius:50%;color:#fff;cursor:pointer;
}
.gdchat-close:hover{background:rgba(255,255,255,.15)}

/* ===== 会話 ===== */
.gdchat-log{
  flex:1;overflow-y:auto;padding:16px 12px 12px;
  display:flex;flex-direction:column;gap:12px;
  font-weight:500;font-size:15px;line-height:1.75;
  -webkit-overflow-scrolling:touch;
}
.gdchat-row{display:flex;gap:8px;align-items:flex-start}
.gdchat-row.-me{justify-content:flex-end}
.gdchat-face{width:38px;height:38px;border-radius:50%;flex:none;object-fit:cover;display:block;background:#fff}
.gdchat-col{display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:calc(100% - 46px)}
.gdchat-name{margin:0 0 4px 2px;font-weight:500;font-size:12px;line-height:1.3;color:#fff}
.gdchat-line{display:flex;align-items:flex-end;gap:6px;max-width:100%}
.gdchat-row.-me .gdchat-line{flex-direction:row-reverse;max-width:86%}

.gdchat-bubble{
  position:relative;min-width:0;padding:8px 13px;border-radius:18px;
  background:#fff;color:var(--gd-ink);
  white-space:pre-wrap;word-break:break-word;line-height:1.75;
}
/* 吹き出しのしっぽ */
.gdchat-bubble::before{
  content:"";position:absolute;top:8px;left:-6px;width:12px;height:12px;
  background:inherit;clip-path:polygon(100% 0,0 0,100% 100%);
}
.gdchat-row.-me .gdchat-bubble{background:var(--gd-me)}
.gdchat-row.-me .gdchat-bubble::before{left:auto;right:-6px;clip-path:polygon(0 0,100% 0,0 100%)}
.gdchat-bubble a{color:#1a5fb4;text-decoration:underline;font-weight:700}
.gdchat-bubble.-error{background:#fff4f4;color:#8a1f1f}

/* 時刻と既読（吹き出しの横） */
.gdchat-meta{flex:none;display:flex;flex-direction:column;align-items:flex-end;font-weight:500;font-size:11px;line-height:1.35;color:#fff;white-space:nowrap}
.gdchat-row:not(.-me) .gdchat-meta{align-items:flex-start}

.gdchat-link{
  display:inline-block;margin-top:8px;padding:6px 14px;
  background:var(--gd-green);color:#fff!important;border-radius:999px;opacity:1;
  font-weight:700;font-size:14px;line-height:1.5;text-decoration:none!important;
}
.gdchat-link:hover{background:#005e4f}

.gdchat-wait{display:flex;gap:5px;align-items:center;padding:6px 0}
.gdchat-wait span{width:7px;height:7px;background:#9aa3ad;border-radius:50%;animation:gdchat-blink 1.2s infinite}
.gdchat-wait span:nth-child(2){animation-delay:.2s}
.gdchat-wait span:nth-child(3){animation-delay:.4s}
@keyframes gdchat-blink{0%,60%,100%{opacity:.3}30%{opacity:1}}
@media (prefers-reduced-motion:reduce){.gdchat-wait span{animation:none;opacity:.6}}

/* ===== 質問の例（LINEのクイックリプライ風に横並び） ===== */
.gdchat-chips{
  flex:none;display:flex;gap:8px;overflow-x:auto;
  padding:2px 12px 12px;scrollbar-width:none;
}
.gdchat-chips::-webkit-scrollbar{display:none}
.gdchat-chips:empty{display:none}
.gdchat-chip{
  flex:none;background:#fff;border:1px solid var(--gd-send);border-radius:999px;
  padding:7px 14px;font-weight:700;font-size:14px;line-height:1.4;color:#05a347;cursor:pointer;white-space:nowrap;
}
.gdchat-chip:hover{background:#effbf3}

/* ===== 入力 ===== */
.gdchat-form{
  flex:none;display:flex;gap:8px;align-items:flex-end;
  padding:8px 10px;background:#fff;
}
.gdchat-form textarea{
  flex:1;resize:none;max-height:120px;
  padding:8px 14px;border:0;border-radius:20px;
  font-weight:500;font-size:16px;line-height:1.5;color:var(--gd-ink);background:#f1f2f4;
}
.gdchat-form textarea:focus{outline:2px solid var(--gd-send);outline-offset:0}
.gdchat-send{
  flex:none;width:40px;height:40px;display:flex;align-items:center;justify-content:center;
  background:var(--gd-send);color:#fff;border:none;border-radius:50%;cursor:pointer;
}
.gdchat-send:hover{background:#05b04b}
.gdchat-send:disabled{background:#b9e8cb;cursor:default}

.gdchat-note{
  flex:none;margin:0;padding:6px 14px 10px;background:#fff;
  font-size:14px;line-height:1.6;font-weight:500;color:var(--gd-ink);
}

/* ===== スマホ ===== */
@media (max-width:900px){
  .gdchat-launch{left:12px;bottom:72px;gap:8px;padding:5px 16px 5px 5px}
  .gdchat-launch-face,.gdchat-launch-ico{width:38px;height:38px}
  .gdchat-launch-ico svg{width:20px;height:20px}
  .gdchat-launch-txt b{font-size:15px}
  .gdchat-launch-txt small{font-size:12px}
  .gdchat-panel{
    left:8px;right:8px;bottom:68px;width:auto;max-width:none;
    height:min(78vh,calc(100vh - 130px));
  }
}

.gdchat .screen-reader-text{
  position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);
  white-space:nowrap;
}
