/* style.css */

body {
  font-family: sans-serif;
  background: #f4f4f4;
  margin: 0;
  padding: 2em;
}

.container {
  max-width: 700px;
  margin: auto;
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

h1, h2 {
  color: #2c3e50;
}

label {
  display: block;
  margin-top: 1em;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 0.6em;
  margin-top: 0.4em;
  border: 1px solid #ccc;
  border-radius: 4px;
}

input[type="submit"] {
  background: #3498db;
  color: #fff;
  border: none;
  padding: 0.8em 1.5em;
  margin-top: 1.5em;
  cursor: pointer;
  border-radius: 4px;
}

input[type="submit"]:hover {
  background: #2980b9;
}

.message {
  margin-top: 1em;
  padding: 1em;
  background: #eafaf1;
  border: 1px solid #b2dfdb;
  border-radius: 4px;
  color: #2c3e50;
}

.section {
  margin-top: 4em;
  padding: 2em;
  background: #f9f9f9;
  border-radius: 8px;
}

.button-link {
  display: inline-block;
  margin-top: 1em;
  padding: 0.8em 1.5em;
  background: #2ecc71;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}


/* 基本のボックスサイズを全要素に統一 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
    padding: 1em;
  }

  .container {
    padding: 1.5em 1em;
    width: 100%;
    margin: 0 auto;
  }

  h1, h2 {
    font-size: 1.4em;
    line-height: 1.4;
    margin-bottom: 0.6em;
  }

  label {
    font-size: 1em;
    margin-top: 1em;
  }

  input[type="text"],
  input[type="email"] {
    font-size: 1em;
    padding: 0.8em;
  }

  input[type="submit"] {
    width: 100%;
    font-size: 1em;
    padding: 1em;
  }

  .message {
    font-size: 1em;
    padding: 1em;
  }

  .section {
    padding: 1.5em 1em;
  }

  .button-link {
    display: block;
    width: 100%;
    font-size: 1em;
    text-align: center;
    padding: 1em;
    margin-top: 1.5em;
  }

  ul {
    padding-left: 1.2em;
  }

  ul li {
    margin-bottom: 0.8em;
    line-height: 1.5;
  }
}

/*-------------------------*/


/* 全体設定 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', sans-serif;
  margin: 0;
  padding: 0;
  background: #f8f8f8;
  color: #333;
  line-height: 1.6;
  font-size: 18px;
}

/* ヘッダー */
header {
  background: #2c3e50;
  color: white;
  padding: 1em 2em;
}
header h1 {
  margin: 0;
  font-size: 2.2em;
}

/* コンテナ */
.container {
  max-width: 900px;
  margin: 2em auto;
  background: white;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
}

/* 見出し・本文 */
h2 {
  color: #2c3e50;
  margin-top: 2em;
  font-size: 1.8em;
}
p {
  font-size: 1.1em;
  margin-bottom: 1em;
}
ul {
  margin-left: 1.5em;
  font-size: 1.1em;
}
li {
  margin-bottom: 1.2em;
}
strong {
  color: #27ae60;
}

/* CTAボタン */
.cta {
  background: #2ecc71;
  color: white;
  display: inline-block;
  padding: 1em 2em;
  margin-top: 2em;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
}

/* フッター */
footer {
  margin-top: 4em;
  text-align: center;
  color: #777;
  font-size: 1em;
}




/* チャットウィジェット */

/* チャットウィジェット共通 */
#chat-widget {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 400px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  font-size: 15px;
  animation: popup-bounce 1s ease-in-out 3;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateY(0);
}

#chat-widget .chat-header {
  background: #2c3e50;
  color: #fff;
  padding: 12px;
  border-radius: 8px 8px 0 0;
  font-size: 16px;
}

#chat-body {
  padding: 12px;
  height: 280px;
  overflow-y: auto;
  font-size: 14.5px;
}

.chat-input-area {
  display: flex;
  border-top: 1px solid #eee;
  padding: 10px;
  gap: 8px;
  align-items: center;
}

.chat-input-area input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  border-radius: 4px;
}

.chat-input-area button {
  background: #27ae60;
  color: #fff;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}

/* 最小化チャットボタン */
#chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #2ecc71;
  color: white;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 24px;
  text-align: center;
  line-height: 56px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
  display: none; /* デフォルトはPC非表示 */
}

/* アニメーション */
@keyframes pulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
  70%  { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

@keyframes popup-bounce {
  0%   { transform: translateY(0); }
  25%  { transform: translateY(-10px); }
  50%  { transform: translateY(0); }
  75%  { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

/* ===== モバイル向けスタイル ===== */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    padding: 1em;
  }

  .container {
    padding: 1.5em 1em;
    width: 100%;
    margin: 0 auto;
  }

  h1, h2 {
    font-size: 1.4em;
    line-height: 1.4;
    margin-bottom: 0.6em;
  }

  label {
    font-size: 1em;
    margin-top: 1em;
  }

  p, ul {
    font-size: 1em;
    line-height: 1.6;
  }

  li {
    margin-bottom: 0.8em;
  }

  .cta {
    width: 100%;
    display: block;
    text-align: center;
    padding: 1em;
    font-size: 1.1em;
  }

  #chat-widget {
    width: 95vw;
    right: 2.5vw;
    bottom: 80px;
    font-size: 14px;
    display: none; /* 最初は非表示（トグルで開く） */
    flex-direction: column;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }

  #chat-body {
    height: 200px;
    padding: 10px;
    font-size: 13.5px;
  }

  .chat-input-area {
    flex-direction: column;
    padding: 8px;
    gap: 6px;
  }

  .chat-input-area input,
  .chat-input-area button {
    width: 100%;
    font-size: 14px;
    padding: 10px;
  }

  #chat-toggle {
    display: block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 22px;
  }
}

/* ===== PC向けデフォルト表示 ===== */
@media (min-width: 769px) {
  #chat-widget {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
  }

  #chat-toggle {
    display: none;
  }
}

textarea {
  width: 100%;
  padding: 0.8em;
  margin-top: 0.4em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  resize: vertical;
  font-size: 1em;
  line-height: 1.5;
}