/* style.css */

/* 全体リセット: パディングとボーダーを要素の幅に含める */
* {
  box-sizing: border-box;
}

/* HTMLとbodyの基本設定 */
html,
body {
  width: 100%;
  overflow-x: hidden;
  font-family: sans-serif;
  background: #f4f4f4;
  padding: 16px;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

/* コンテナの共通設定 */
.container,
.form-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

/* ヘッダー */
header {
  text-align: center;
  padding: 10px;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 20px;
}
header img {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

/* ヘッダー内ボタン */
.header-buttons {
  display: flex;
  justify-content: space-between;
  margin: 10px auto;
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  padding: 0 16px;
}
.header-buttons a {
  flex: 0 0 48%;
  padding: 10px 0;
  background-color: #004d00;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
  white-space: nowrap;
  min-width: 100px;
}

/* 見出し */
h1,
h2,
h3 {
  text-align: center;
  margin-bottom: 24px;
  color: #333;
}

/* フォーム要素 */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  font-size: 16px;
  padding: 8px 10px;
  margin-bottom: 12px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  height: 48px;
}
textarea {
  height: auto;
  min-height: 96px;
}

/* ボタン */
button {
  font-size: 16px;
  padding: 10px 20px;
  margin-bottom: 12px;
  box-sizing: border-box;
  border-radius: 4px;
  cursor: pointer;
}

/* 次へボタン */
.next-button {
  background-color: #007bff;
  color: #fff;
  padding: 12px 24px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  width: 100%;
  max-width: 300px;
  display: block;
  margin: 20px auto;
}
.next-button:hover {
  background-color: #0056b3;
}

/* 必須ラベル */
.required-label {
  background: red;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  margin-right: 8px;
  border-radius: 3px;
  display: inline-block;
}

/* 姓・名 横並び */
.name-row {
  display: flex;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
}
.name-row input,
.name-row p {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  height: 48px;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
}
.name-row p {
  background-color: #e9e9e9;
}

/* 進捗バー */
.step-bar {
  display: flex;
  justify-content: space-between;
  margin: 20px auto;
  padding: 0 10px;
  font-size: 14px;
  max-width: 600px;
  width: 100%;
}
.step {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-bottom: 3px solid #ccc;
  color: #444;
}
.step.active {
  border-color: #007bff;
  color: #007bff;
  font-weight: bold;
}

/* フッターリンク */
footer {
  text-align: center;
  padding: 20px 0;
  margin-top: 30px;
  border-top: 1px solid #eee;
  background-color: #f4f4f4;
}
footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-link {
  font-size: 14px;
  color: #0000ee;
  text-decoration: none;
  padding: 5px 10px;
}
.footer-link:hover {
  text-decoration: underline;
}

/* 店舗情報カード（任意） */
.shop-info-card {
  max-width: 600px;
  margin: 2em auto;
  background-color: #f0f8ff;
  border: 2px solid #007bff;
  border-radius: 10px;
  padding: 1.5em;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  text-align: left;
  font-family: "Helvetica", "Arial", sans-serif;
}
.shop-info-card .shop-name {
  margin-top: 0;
  margin-bottom: 1em;
  font-size: 1.4em;
  color: #007bff;
  font-weight: bold;
  border-bottom: 1px solid #007bff;
  padding-bottom: 0.5em;
}
.shop-info-card .shop-info-detail p {
  margin: 0 0 1em 0;
  font-size: 1em;
  line-height: 1.6;
}
.shop-info-card strong {
  color: #333;
  font-weight: 600;
}

/* ========= お問い合わせモーダル ========= */
.contact-modal {
  display: none; /* JSで block に */
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
}
.contact-modal__dialog {
  background: #fff;
  width: min(720px, 92vw);
  margin: 4rem auto;
  border-radius: 16px;
  padding: 24px 20px;
  position: relative;
  max-height: 86vh;
  overflow: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.contact-modal__close {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1;
}
.contact-modal .form-container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 8px 20px;
  box-shadow: none;
  border-radius: 12px;
  background: #fff;
}
#response {
  font-size: 0.95rem;
}
#response.success {
  color: #0a7f2e;
}
#response.error {
  color: #c62828;
}
body.modal-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .contact-modal__dialog {
    margin: 2rem auto;
    padding: 16px 12px;
    border-radius: 12px;
  }
}

/* スマホ最適化 */
@media screen and (max-width: 480px) {
  body {
    padding: 8px;
  }
  .container,
  .form-container {
    padding: 15px;
  }

  .name-row {
    flex-direction: column;
  }
  .name-row input,
  .name-row p {
    height: auto;
    min-height: 48px;
  }

  .header-buttons {
    padding: 0 8px;
    flex-direction: column;
    max-width: none;
  }
  .header-buttons a {
    flex: none;
    width: 100%;
    margin-bottom: 10px;
  }
  .header-buttons a:last-child {
    margin-bottom: 0;
  }
}

#response {
  text-align: center;
  font-size: 1rem;
  margin-top: 1em;
  display: block;
  width: 100%;
}
