@charset "utf-8";
/* チャットボット表示中のスタイル調整 */
.chatbot-active .exit-popup,
.chatbot-active #overlay {
  pointer-events: none; /* クリックイベントを無効化 */
  user-select: none; /* テキスト選択を無効化 */
}
/* チャットボット関連スタイル */
.chatbot-container {
  position: fixed;
  bottom: -80vh;
  right: 0;
  max-width: 500px;
  width: 100%;
  height: 80vh;
  background-color: rgba(255, 255, 255);
  z-index: 20000;
  display: flex;
  flex-direction: column;
  transition: bottom 0.5s ease;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}
.chatbot-header {
  /*display: flex;*/
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #4a6cf7;
  color: white;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
 position:relative;
}
.chatbot-title {
  font-size: 18px;
  font-weight: bold;
}
.close-chatbot {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0 10px;
  position:absolute;
  top:50%;
  right:5%;
  transform:translateY(-50%);
}
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.message {
  max-width: 80%;
  margin-bottom: 15px;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.4;
  animation: fadeIn 0.3s forwards;
  opacity: 0;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.bot-message {
  background-color: #f0f0f0;
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}
.user-message {
  background-color: #4a6cf7;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}
.chatbot-input {
  padding: 20px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
}
.input-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.chat-input-field {
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 10px;
  width: 100%;
}
.chat-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.chat-half-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
    width: 50%;
}
select.chat-input-field {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 1em;
}
.chat-next-btn {
  padding: 12px 20px;
  background-color: #4a6cf7;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
  margin-left: auto;
}
.chat-next-btn:hover {
  background-color: #3a5ce5;
}
.chat-submit-btn {
  padding: 12px 20px;
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
  margin-left: auto;
}
.chat-submit-btn:hover {
  background-color: #27ae60;
}
.hidden-form {
  display: none;
}
.show-chatbot {
  bottom: 0;
}
.chatbot-active .cta-container {
  /*  opacity: 0;*/
  pointer-events: none;
}
.confirmation-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
}
.confirmation-table th, .confirmation-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.confirmation-table th {
  background-color: #f0f0f0;
  font-weight: 600;
  width: 35%;
}
.confirmation-table tr:last-child th, .confirmation-table tr:last-child td {
  border-bottom: none;
}
.btn-container {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 15px;
}

@media (max-height:667px){
.cta-container {
  padding: 12px 0;
}
.tok {
  margin: 0 auto;
}
.navigation{
bottom:120px;
}
}
.section {
  height: var(--section-height);
}
.cta-container {
  height: var(--cta-height);
}

/* モバイルキーボード表示時のレイアウト調整用CSS */

/* ビューポート調整用のスタイル */
@media screen and (max-width: 767px) {
  /* iOS対応 */
  html {
    height: -webkit-fill-available;
  }
  
  body {
    min-height: -webkit-fill-available;
    overflow-x: hidden;
  }
  
  /* チャットボットがアクティブな時 */
  body.chatbot-active {
    position: relative;
    overflow: hidden;
    touch-action: none;
  }
  
  /* キーボードが表示された時のチャットボットコンテナの挙動 */
  .chatbot-container {
    /* 現在の高さを維持しつつ、フレックスレイアウトでチャットエリアを拡張可能に */
    display: flex;
    flex-direction: column;
    height: 80vh; /* 高さを維持 */
    max-height: 80vh;
  }
  
  /* iOS/Android向けの入力フォーカス時のハック */
  .ios-keyboard-open .chatbot-container,
  .android-keyboard-open .chatbot-container {
    height: 100%; /* キーボード表示時は高さを調整 */
    bottom: 0;
    position: fixed;
    /* Safari用のハック */
    position: -webkit-sticky;
  }
  
  /* メッセージ表示エリアは伸縮可能に */
  .chatbot-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS向けスムーススクロール */
  }
  
  /* 入力エリアは固定サイズに */
  .input-container {
    flex-shrink: 0;
  }
  
  /* フォーカス時のスタイル */
  .chat-input-field:focus,
  .chat-half-input:focus {
    outline: none;
    border-color: #4a6cf7;
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
  }
}

/* キーボード表示時のスクロール制御用クラス */
.keyboard-open {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* 入力フィールドフォーカス時のズーム防止 */
input, textarea, select {
  font-size: 16px; /* iOSでのズーム防止 */
}

/* 確認テーブルのモバイル調整 */
@media screen and (max-width: 480px) {
  .confirmation-table th, 
  .confirmation-table td {
    padding: 10px;
    font-size: 14px;
  }
  
  .chat-next-btn,
  .chat-submit-btn {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .btn-container {
    flex-direction: column;
  }
}

/* 横スクロールコンテンツとチャットボットの共存 */
.chatbot-active .sections-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0; /* チャットボットより下に */
}
