/* =====================================================================
   クーポン共通スタイル（共通パーツ）
   - HTML は common/templates/template_coupon.html、本CSSが唯一の見た目定義。
   - area / chain(brand) など各ページの CSS の後に読み込む（最終勝ち）。
   - 編集はこのファイル1か所で全ページに反映される。
   ===================================================================== */

/* ---- クーポンセクション本体（罫線で囲う） ---- */
.coupon-section {
  margin-bottom: 40px;
  /* menu レッド #e61e0a の少し薄い版。ポップアップ内は .modal-content 側で打ち消す */
  border: 3px solid #ea4b3b;
  border-radius: 12px;
  padding: 16px 16px 20px;
}

.coupon-section-title {
  font-size: 20px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 12px;
  color: #333;
  line-height: 1.4;
  text-align: left;
}

.coupon-image-link {
  display: block;
  margin-bottom: 15px;
  text-align: center;
}

.coupon-banner-img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  display: inline-block;
}

.coupon-description {
  font-size: 14px;
  color: #333;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: left;
  padding: 0;
}

.coupon-code-box {
  background-color: #f5f0eb;
  border-radius: 10px;
  padding: 16px 20px 12px;
  margin-bottom: 12px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.coupon-code-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.coupon-code-label {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  white-space: nowrap;
}

.coupon-code-value {
  font-size: 22px;
  font-weight: 900;
  color: #333;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.coupon-copy-btn {
  display: inline-block;
  padding: 8px 20px;
  background-color: #43c66f;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 12px;
  white-space: nowrap;
  transition: background-color 0.3s;
}

.coupon-copy-btn:hover {
  background-color: #4a8a24;
}

.coupon-code-note {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
}

.coupon-copied-msg {
  text-align: center;
  color: #43c66f;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 16px;
  opacity: 0;
  transition: opacity 0.3s;
  height: 0;
  overflow: hidden;
}

.coupon-copied-msg.show {
  opacity: 1;
  height: auto;
  padding-top: 8px;
}

.coupon-cta-link {
  display: block;
  text-align: center;
  text-decoration: none;
}

.coupon-cta-btn {
  display: inline-block;
  padding: 14px 40px;
  background-color: #e61e0a;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 99px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.coupon-cta-btn:hover {
  background-color: #b71c1c;
}

/* ---- クーポン注釈 ---- */
.coupon-disclaimer {
  margin-top: 30px;
  margin-bottom: 20px;
  padding: 15px 0;
}

.coupon-disclaimer-title {
  font-size: 13px;
  font-weight: bold;
  color: #888;
  margin-bottom: 8px;
}

.coupon-disclaimer-list {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
}

.coupon-disclaimer-list li {
  font-size: 12px;
  color: #999;
  line-height: 1.6;
  margin-bottom: 4px;
}

.coupon-disclaimer-list li:last-child {
  margin-bottom: 0;
}

/* ---- PC: 枠幅を画像(最大600px)に合わせ中央寄せ、見出しを少し大きく ---- */
@media (min-width: 768px) {
  .coupon-section {
    max-width: 638px; /* padding16*2 + border3*2 を含め内側を画像の600pxに合わせる */
    margin: 28px auto 56px;
  }
  .coupon-section-title {
    font-size: 24px;
  }
}

/* ---- SP: 縦幅を抑えるため小さめ＆クーポンコードを1行に ---- */
@media (max-width: 767px) {
  .coupon-section {
    padding-top: 12px;
  }
  .coupon-section-title {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .coupon-description {
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 16px;
  }
  .coupon-code-box {
    padding: 10px 10px 8px;
  }
  .coupon-code-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
  }
  .coupon-code-label {
    font-size: 10px;
  }
  .coupon-code-value {
    font-size: 14px;
    letter-spacing: 0;
  }
  .coupon-copy-btn {
    margin-left: 4px;
    padding: 6px 10px;
    font-size: 11px;
    width: auto;
    max-width: none;
  }
  .coupon-code-note {
    font-size: 10px;
  }
}

/* ---- ポップアップ(#appRedirectModal)内のクーポンは罫線なし・中央寄せ ---- */
.modal-content .coupon-section {
  margin-bottom: 0;
  text-align: center;
  padding: 0 4px;
  border: none;
  border-radius: 0;
}
.modal-content .coupon-section-title {
  font-size: 16px;
  line-height: 1.45;
  margin: 0 32px 14px;
  text-align: center;
}
.modal-content .coupon-image-link {
  margin-bottom: 12px;
}
.modal-content .coupon-banner-img {
  max-width: 100%;
  border-radius: 8px;
  vertical-align: top;
}
.modal-content .coupon-description {
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 16px;
  text-align: left;
  padding: 0 2px;
}
.modal-content .coupon-code-box {
  padding: 14px 16px 12px;
  margin-bottom: 10px;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
.modal-content .coupon-code-inner {
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  row-gap: 10px;
}
.modal-content .coupon-copy-btn {
  margin-left: 0;
  flex-shrink: 0;
}
.modal-content .coupon-code-note {
  margin-top: 8px;
}
.modal-content .coupon-copied-msg.show {
  margin-bottom: 8px;
}
.modal-content .coupon-cta-link {
  display: block;
  margin-top: 4px;
}
.modal-content .coupon-cta-btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 99px;
  padding: 14px 20px;
}
@media (min-width: 768px) {
  .modal-content .coupon-code-inner {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 14px 18px;
  }
}
