/**
 * SM Shop & Inquiry — フロントエンド用追加スタイル (v6)
 * 既存テーマの .Form / .Form-Item / .Form-Btn / .discography_form を活かしつつ、
 * 新フォーム特有の要素のみ補完する。
 */

/* ================================================================
 * 既存テーマフォームのレイアウト補正
 * ================================================================ */
/* CONTACT セクション全体 */
.contact .container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 既存テーマで dl.Form が flex 横並びだった場合の崩れ防止 */
.contact .Form {
  display: block;
  margin: 30px auto 0;
  padding: 0;
}
.contact .Form-Item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #e8e8e8;
  margin: 0;
  gap: 0;
}
.contact .Form-Item:last-of-type {
  border-bottom: none;
}
.contact .Form-Item-Label {
  flex: 0 0 180px;
  font-weight: 600;
  font-size: 15px;
  color: #333;
  padding: 0;
  margin: 0;
  position: relative;
}
.contact .Form-Item.required .Form-Item-Label::before,
.contact .Form-Item-Input.required::before,
.contact dd.required::before {
  content: "必須";
  display: inline-block;
  background: #c33;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
  line-height: 1.3;
}
.contact .Form-Item-Input,
.contact .Form-Item-Textarea {
  flex: 1;
  min-width: 240px;
  padding: 0;
  margin: 0;
}
.contact .Form-Item-Input2,
.contact .Form-Item-Textarea2 {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  background: #fafafa;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
.contact .Form-Item-Input2:focus,
.contact .Form-Item-Textarea2:focus {
  outline: none;
  border-color: #5b9bd5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91,155,213,0.15);
}
.contact .Form-Item-Textarea2 {
  min-height: 140px;
  resize: vertical;
}

/* readonly フィールドの表示 */
.contact .Form-Item-Input2[readonly] {
  background: #f0f0f0;
  color: #555;
  cursor: not-allowed;
}

/* 送信ボタン */
.contact p#form_submit {
  text-align: center;
  margin: 40px 0 0;
}
.contact .Form-Btn {
  display: inline-block;
  padding: 14px 50px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-weight: 600;
}
.contact .Form-Btn:hover {
  background: #555;
  transform: translateY(-1px);
}
.contact .Form-Btn:active {
  transform: translateY(0);
}

/* ================================================================
 * エラー表示
 * ================================================================ */
.smsi-errors,
.smsi-legacy-errors {
  background: #fff3f3;
  border: 1px solid #e8b0b0;
  border-left: 4px solid #c33;
  color: #a02828;
  padding: 16px 22px;
  margin: 0 auto 28px;
  max-width: 700px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.7;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.smsi-errors p,
.smsi-legacy-errors p {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 15px;
}
.smsi-errors ul,
.smsi-legacy-errors ul {
  margin: 0;
  padding-left: 22px;
}
.smsi-errors li,
.smsi-legacy-errors li {
  list-style: disc;
  line-height: 1.7;
}

/* ================================================================
 * 確認画面・完了画面メッセージ
 * ================================================================ */
.smsi-confirm-msg,
.smsi-complete-msg,
.smsi-legacy-msg,
.smsi-legacy-complete,
.smsi-sale-note {
  text-align: center;
  margin: 0 auto 28px;
  max-width: 700px;
  padding: 0 20px;
  line-height: 1.85;
  color: #444;
  font-size: 15px;
}
.smsi-sale-note {
  background: #fff8e1;
  border-left: 3px solid #fb8c00;
  padding: 14px 18px;
  text-align: left;
  font-size: 14px;
}
.smsi-legacy-complete {
  padding: 30px 20px;
  line-height: 2.0;
}

/* ================================================================
 * 確認画面の dd(値表示)
 * ================================================================ */
.smsi-legacy-stage .Form-Item-Input,
.smsi-order-form .Form-Item-Input,
.smsi-inquiry-form .Form-Item-Input {
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  min-height: 1.6em;
  word-wrap: break-word;
  word-break: break-all;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

/* ================================================================
 * 確認画面のボタンエリア
 * ================================================================ */
.smsi-legacy-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 35px;
}
.smsi-legacy-actions form {
  margin: 0;
  display: inline-block;
}
.smsi-legacy-actions p#form_submit {
  margin: 0;
}

/* 確認画面の送信/戻るボタンを横並びに */
.smsi-order-form > form + form,
.smsi-inquiry-form > form + form {
  margin-top: 12px;
}

/* 戻るボタン */
.smsi-back-btn,
.Form-Btn.smsi-legacy-back {
  background-color: #8c8c8c !important;
  opacity: 0.92;
}
.smsi-back-btn:hover,
.Form-Btn.smsi-legacy-back:hover {
  background-color: #707070 !important;
  opacity: 1;
}

/* ================================================================
 * 振込先表示(注文完了画面)
 * ================================================================ */
.smsi-bank-info {
  max-width: 520px;
  margin: 30px auto 0;
  padding: 20px 24px;
  background: #f6f6f6;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.smsi-bank-info h3 {
  margin: 0 0 12px;
  font-size: 16px;
  border-bottom: 2px solid #999;
  padding-bottom: 8px;
  color: #333;
}
.smsi-bank-info pre {
  font-family: inherit;
  white-space: pre-wrap;
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: #444;
}

/* ================================================================
 * ディスコグラフィ価格表示
 * ================================================================ */
.smsi-price-line {
  font-size: 18px;
  font-weight: 700;
  color: #c00;
  margin: 12px 0;
}
.smsi-stock-line {
  font-size: 13px;
  color: #666;
  margin: 4px 0;
}

/* ================================================================
 * 完売・在庫切れ
 * ================================================================ */
.smsi-sold-out {
  text-align: center;
  padding: 30px 15px;
  color: #999;
  font-size: 16px;
}

/* ================================================================
 * レスポンシブ
 * ================================================================ */
@media (max-width: 768px) {
  .contact .container {
    padding: 0 15px;
  }
  .contact .Form-Item {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 0;
  }
  .contact .Form-Item-Label {
    flex: 0 0 auto;
    margin-bottom: 8px;
    font-size: 14px;
  }
  .contact .Form-Item-Input,
  .contact .Form-Item-Textarea {
    min-width: 0;
    width: 100%;
  }
  .contact .Form-Btn {
    width: 100%;
    padding: 14px 20px;
  }
  .smsi-legacy-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .smsi-legacy-actions form {
    width: 100%;
  }
  .smsi-legacy-actions .Form-Btn {
    width: 100%;
  }
}

/* ============================================================
 * サンクスページ (10秒カウントダウン付き)
 * ============================================================ */
.smsi-thanks {
    text-align: center;
    padding: 40px 20px;
}
.smsi-thanks-heading {
    font-size: 1.4em;
    font-weight: bold;
    margin: 20px 0 15px;
    color: #333;
}
.smsi-thanks-message {
    line-height: 1.8;
    margin: 0 auto 30px;
    max-width: 640px;
    color: #555;
}
.smsi-thanks-redirect {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed #ccc;
}
.smsi-redirect-notice {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}
.smsi-cd {
    display: inline-block;
    min-width: 1.8em;
    padding: 0 6px;
    font-weight: bold;
    font-size: 1.2em;
    color: #c00;
}
.smsi-thanks-back {
    display: inline-block;
    padding: 12px 36px;
    background: #333;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}
.smsi-thanks-back:hover {
    background: #555;
}
.smsi-bank-info {
    max-width: 480px;
    margin: 25px auto;
    padding: 20px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: left;
}
.smsi-bank-info h3 {
    margin: 0 0 10px;
    font-size: 1.05em;
    color: #333;
}
.smsi-bank-info pre {
    margin: 0;
    font-family: inherit;
    white-space: pre-wrap;
    line-height: 1.7;
}
