
.pageTop {visibility: hidden;}

.footer_chat {
  position:fixed;
  bottom:60px;
  right:0px;
  z-index:9000;
  cursor:pointer;
}

@media screen and (max-width:640px) {
  .footer_chat {
    width:38%;
  }
}
@media screen and (min-width:641px) {
  .footer_chat {
    bottom:14px;
    right:10px;
    transition: filter 0.2s ease; /* ほわっと変化させる */
  }
}



.footer_chat:hover {
  /*filter: drop-shadow(5px 5px 10px #fff);*/
}
/* =========================
   モーダル背景
========================= */
.chat_modal_bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
}

/* =========================
   モーダル本体
========================= */
.chat_modal {
  width: 90%;
  max-width: 540px;
  height: 90vh;
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 20px;
  z-index: 10001;
  font-family: Verdana, Roboto, 'Droid Sans', 'ヒラギノ角ゴ ProN W3', 'Hiragino Kaku Gothic ProN', メイリオ, Meiryo, sans-serif;
}
.chat_modal_inner {
  position:relative;
}





.chat_modal_close {
  width:2em;
  line-height:2em;
  text-align:center;
  display:inline-block;
  color:#fff;
  font-weight:bold;
  font-size:18px;
  cursor:pointer;
  border:1px solid #fff;
  border-radius: 100%;
  position:absolute;
  top:20px;
  right:15px;
}
.fctype_header {
  padding:15px 60px 15px 20px;
  background:#0fa0ea;
  color:#fff;
  font-weight:bold;
  font-size:18px;
  line-height:1.15;
  border-radius: 20px 20px 0 0;
  display:flex;
  gap:10px;
}
.fctype_header_logo {
  width:40px;
  height:40px;
  float:left;
}
.fctype_header_text {
  white-space:nowrap;
}
.captcha-wrapper {
  font-size:12px;
  font-weight:normal;
}
.captcha-wrapper a {
  color:#fff;
  text-decoration:underline;
}
.fctype_body {
  padding:30px;
  line-height:1.4;
  font-size:16px;
}
.fctype_body p {
  margin:0;
}
.fctype01_form {
  padding:20px;
  font-size:16px;
}
.fctype01_form dl {
  margin-top:20px;
}
.fctype01_form dd {
  margin-bottom:5px;
}
.fctype01_form input,
.fctype01_form select,
.fctype01_form textarea {
  padding:3px;
  font-size:16px;
}





.chat_modal * {box-sizing:border-box;}
.chat_contact {
  width: 200px;
  position: fixed;
  bottom: 20px;
  z-index: 1000;
}

/* 画面幅が950pxより大きい場合（サイト幅基準） */
@media screen and (min-width: 951px) {
  .chat_contact {
    left: 50%;
    margin-left: calc(950px / 2 - 200px);
    right: auto;
  }
}

/* 画面幅が950px以下の場合（画面右下） */
@media screen and (max-width: 950px) {
  .chat_contact {
    /*right: 20px;*/
    right:0;
    left: auto;
    margin-left: 0;
  }
}
.chat_contact_inner {
  /*background:red;*/
  padding:10px;
}
.chat_contact_btnchat {
  font-weight:bold;
  font-size:16px;
  padding: 15px;
  background: #ff6600;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  cursor:pointer;
  display:inline-block;
  margin:0 auto;
}
.chat_contact_btnchat:hover {
  background: #ff0000;
}

/* =========================
   モーダル背景
========================= */
.chat_modal_bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
}

/* =========================
   モーダル本体
========================= */
.chat_modal {
  width: 90%;
  max-width: 540px;
  height: 90vh;
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 20px;
  z-index: 10001;
}

/* =========================
   中身
========================= */
.chat_modal_inner {
  position: relative;
  height:100%;
}
.chat-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,1);
  z-index: 9999;
  /*display: flex;*/
  justify-content: center;
  align-items: center;
}
/* =========================
   スクロール禁止
========================= */
html.modal_open,
body.modal_open {
  overflow: hidden;
  height: 100%;
}
/* =========================
   チャットエリア
========================= */
.chat_area {
  margin:0 auto;
  border: 1px solid #ddd;
  border-radius:20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  background:;
}

.login_logo {
  background:#fff;
  padding:5px 0;
  text-align:center;
  border-bottom:2px solid #ddd;
  flex: 0 0 auto;   /* 高さ固定 */
}

@media screen and (max-width:640px) {
  .login_logo img {
    width:50%;
  }
}
.message.left .timestamp {
  text-align:left;
}
.chat_disp_name {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-top: 3px;
}
.message.right .avatar {display:none;}

.chat-box {
  padding: 15px 15px 30px;
  flex: 1 1 auto;   /* 余白を全部使う */
  overflow-y: auto; /* 中央だけスクロール */
  display: flex;
  flex-direction: column;
  background-color: #ecf6ff;
  position:relative;
}

.message {
  margin: 10px 0;
  display: flex;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

/* 自分のメッセージ（左側） */
.message.left {
  justify-content: flex-start;
  flex-direction: row;
}

.message.left .bubble {
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 18px;
  border-top-left-radius: 0;
  padding: 10px 14px;
  margin-left: 8px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
  order:1;
}
.message.left .timestamp {
  order:2;
}
.message.left .avatar {
  /*display: none;*/
}

/* 相手のメッセージ（右側） */
.message.right {
  justify-content: flex-end;
  flex-direction: row;
}

.message.right .bubble {
  background-color: #a3f166;
  border-radius: 18px;
  border-top-right-radius: 0;
  padding: 10px 14px;
  margin-right: 8px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
  order:2;
  text-align:left;
}
.message.right .timestamp {
  order:1;
}

/* 共通：吹き出し内テキスト・時刻 */
.bubble {
  min-width:30%;
  max-width: 65%;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  word-break: break-word;
}

.chat_text {
  width:100%;
  line-height: 1.5;
  white-space: pre-wrap; /* 改行をそのまま表示し、端まで来たら折り返す設定 */
  word-break: break-all; /* 長い英単語などがあっても枠外にはみ出さないようにする */
}
.chat_text img {
  width:100%;
  height:auto;
}

.timestamp {
  font-size: 11px;
  color: #888;
   margin-top: auto;
   margin-left:5px;
   margin-right:5px;
}

.input-area {
  flex: 0 0 auto;   /* 高さ固定 */
  flex-wrap: wrap;
  width:100%;
  bottom:0;
  padding: 10px;
  border-radius:0 0 20px 20px;
  border-top: 1px solid #ccc;
  background-color: #fff;
  box-sizing:border-box;
}

#chatForm  textarea {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 10px;
  outline: none;
  font-size: 16px;
}

.input-area button {
  margin-left: 10px;
  padding: 0 20px;
  height:40px;
  border: none;
  background-color: #06c755;
  color: white;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.upload-btn5 {
  margin-right:10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #eee;
  color: #333;
  font-size: 18px;
  text-align: center;
  line-height: 40px;
  cursor: pointer;
  user-select: none;
}

.chat_ctrl {
  display:flex;
}



.grecaptcha-badge {
  visibility: hidden;
}
.fctype01_form dt {
  margin-bottom:3px;
}


/* 時間外 */

.chat_modal_bg,
.chat_modal,
.chat-overlay {
  /*display: block!important;*/
}
/* =========================
   フォーム全体
========================= */
.fctype01_form {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 12px;
  /*box-shadow: 0 10px 30px rgba(0,0,0,0.08);*/
  box-sizing: border-box;
}

/* =========================
   dl レイアウト
========================= */
.contact_modal_dl01 {
  margin-bottom: 20px;
}

.contact_modal_dl01 dt {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

.contact_modal_dl01 dd {
  margin: 0;
}

/* =========================
   input / select / textarea
========================= */
.fctype01_form input,
.fctype01_form select,
.fctype01_form textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  box-sizing: border-box;
  transition: 0.2s ease;
}

/* フォーカス時 */
.fctype01_form input:focus,
.fctype01_form select:focus,
.fctype01_form textarea:focus {
  outline: none;
  border-color: #4c9aff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(76,154,255,0.15);
}

/* textarea */
.fctype01_form textarea {
  resize: vertical;
  min-height: 120px;
}

/* =========================
   送信ボタン
========================= */
.fctype01_form button {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #4c9aff, #2563eb);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s ease;
}

.fctype01_form button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.fctype01_form button:active {
  transform: translateY(0);
}

.fctype01_form input:focus::placeholder,
.fctype01_form textarea:focus::placeholder {
  color: transparent;
}
/* =========================
   必須項目の視覚強調
========================= */
.input_must {
  border-left: 4px solid #ff6b6b;
}

/* =========================
   スマホ最適化
========================= */
@media (max-width: 600px) {
  .fctype01_form {
    padding: 18px;
  }

  .contact_modal_dl01 dt {
    font-size: 13px;
  }
}


/* 非レスポンシブ用に */

  .footer_chat {
    bottom:14px;
    right:10px;
    transition: filter 0.2s ease; /* ほわっと変化させる */
  }

