/* ============================================================
 *  coupon-system.css
 *  ※ :root カラー変数は基盤CSSで定義済みの想定
 *  ※ すべてのルールは div.coupon-system 内にスコープ
 * ============================================================ */

/* ----------------------------------------------------------
 *  取得ページ: copy_area コピーフィードバック
 * ---------------------------------------------------------- */
div.coupon-system .copy_area {
  cursor: pointer;
  transition: all .2s;
}

div.coupon-system .copy_area:hover {
  opacity: .8;
}

div.coupon-system .copy_area.ms-copied {
  color: #2e7d32 !important;
}

/* ----------------------------------------------------------
 *  取得ページ: 保存ボタン（.area 内に自動追加）
 * ---------------------------------------------------------- */
div.coupon-system .ms-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: min(550px, 109%);
  /* ※ 既存2段階層調整 */
  padding: 14px 18px;
  background: #005bac;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.4rem;
  font-weight: 900;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 10px 16px rgba(0, 91, 172, .20);
  white-space: nowrap;
  vertical-align: middle;
}

div.coupon-system .ms-save-btn:hover {
  filter: brightness(.96);
  transform: translateY(-1px);
}

div.coupon-system .ms-save-btn:active {
  transform: translateY(0);
}

div.coupon-system .ms-save-btn:focus-visible {
  outline: 3px solid rgba(0, 91, 172, .25);
  outline-offset: 2px;
}

div.coupon-system .ms-save-btn .material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
}

/* 取得済み */
div.coupon-system .ms-save-btn--done {
  background: #e9f6e7;
  color: #1e6b2a;
  border: 1px solid rgba(30, 107, 42, .30);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

div.coupon-system .ms-save-btn--done .material-icons {
  color: #4caf50;
}

/* 期限切れ */
div.coupon-system .ms-save-btn--expired {
  background: #f5f5f5;
  color: #999;
  border: 1px solid #ddd;
  cursor: default;
  pointer-events: none;
}

/* ----------------------------------------------------------
 *  決済ページ: ボタン・適用バー
 *  ※ 外（method.aspx）でも使うためスコープなし
 * ---------------------------------------------------------- */
.ms-coupon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ms_blue, #006EB2);
  border: 2px solid var(--ms_blue, #006EB2);
  border-radius: 3px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all .2s;
}

.ms-coupon-btn:hover {
  background: var(--ms_blue, #006EB2);
  color: #fff;
}

.ms-coupon-btn:hover .ms-coupon-badge {
  background: #fff;
  color: var(--ms_blue, #006EB2);
}

.ms-coupon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ms_blue, #006EB2);
  color: #fff;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  padding: 0 4px;
}

.ms-coupon-applied {
  display: none;
  margin-top: 8px;
  padding: 6px 8px;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 3px;
  font-size: 11px;
  color: #2e7d32;
  align-items: center;
  gap: 6px;
}

.ms-coupon-applied.show {
  display: flex;
}

.ms-coupon-applied-text {
  flex: 1;
}

.ms-coupon-remove {
  background: none;
  border: none;
  color: #999;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}

.ms-coupon-remove:hover {
  color: var(--ms_red, #c7321f);
}

/* ----------------------------------------------------------
 *  モーダル
 * ---------------------------------------------------------- */
.ms-coupon-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 99999;
  justify-content: center;
  align-items: center;
}

.ms-coupon-overlay.show {
  display: flex;
}

.ms-coupon-modal {
  background: #fff;
  width: 92%;
  max-width: 460px;
  max-height: 80vh;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: msCouponSlideIn .25s ease-out;
}

@keyframes msCouponSlideIn {
  from {
    opacity: 0;
    transform: scale(.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ms-coupon-modal__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--ms_blue, #006EB2);
  color: #fff;
}

.ms-coupon-modal__title {
  flex: 1;
  font-size: 15px;
  font-weight: bold;
}

.ms-coupon-modal__close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 2px;
  opacity: .8;
}

.ms-coupon-modal__close:hover {
  opacity: 1;
}

.ms-coupon-modal__body {
  overflow-y: auto;
  padding: 12px;
  flex: 1;
}

.ms-coupon-item {
  display: flex;
  align-items: stretch;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all .15s;
}

.ms-coupon-item:hover {
  border-color: var(--ms_blue, #006EB2);
  box-shadow: 0 2px 8px rgba(0, 110, 178, .15);
}

.ms-coupon-item:last-child {
  margin-bottom: 0;
}

.ms-coupon-item__left {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  flex-shrink: 0;
  position: relative;
}

.ms-coupon-item__left::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  transform: translateY(-50%);
}

.ms-type-yen {
  background: var(--ms_red, #c7321f);
}

.ms-type-percent {
  background: var(--ms_blue, #006EB2);
}

.ms-type-shipping {
  background: var(--ms_line, #07c855);
}

.ms-type-other {
  background: var(--ms_blue_dark, #23577D);
}

.ms-coupon-item__discount {
  font-size: 22px;
  line-height: 1.1;
}

.ms-coupon-item__discount small {
  font-size: 11px;
  color: #fff;
}

.ms-coupon-item__type {
  font-size: 10px;
  opacity: .8;
  margin-top: 2px;
}

.ms-coupon-item__right {
  flex: 1;
  padding: 10px 12px;
  display: flex;
  align-items: center;
}

.ms-coupon-item__info {
  flex: 1;
  min-width: 0;
}

.ms-coupon-item__name {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 3px;
}

.ms-coupon-item__cond {
  font-size: 11px;
  color: #888;
  margin-bottom: 2px;
}

.ms-coupon-item__exp {
  font-size: 11px;
  color: var(--ms_red, #c7321f);
}

.ms-coupon-item__arrow {
  flex-shrink: 0;
  margin-left: 8px;
  color: #ccc;
}

.ms-coupon-item:hover .ms-coupon-item__arrow {
  color: var(--ms_blue, #006EB2);
}

/* 削除ボタン */
.ms-coupon-item__delete {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 4px;
  margin-left: 4px;
  border-radius: 4px;
  transition: all .15s;
  display: flex;
  align-items: center;
}

.ms-coupon-item__delete .material-icons {
  font-size: 18px;
}

.ms-coupon-item__delete:hover {
  color: var(--ms_red, #c7321f);
  background: rgba(199, 50, 31, .08);
}

/* ----------------------------------------------------------
 *  トースト
 * ---------------------------------------------------------- */
.ms-coupon-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ms_black, #221815);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 100000;
  transition: transform .3s ease-out;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
  white-space: nowrap;
}

.ms-coupon-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* fallback */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/materialicons/v145/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}

div.coupon-system .material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* ----------------------------------------------------------
 *  ページ固有スタイル
 * ---------------------------------------------------------- */
#title {
  display: block;
  margin: 20px auto 0;
  text-align: center;
  font-size: 1.4rem;
  font-weight: bold;
}

div.coupon-system .main {
  text-align: center;
  padding: 0px 10px 30px 10px;
  margin-bottom: 10px;
}

/* .web ブロック（マージン：新デザイン優先、既存 overflow は保持） */
div.coupon-system .web {
  max-width: 800px;
  margin: 20px auto;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans JP", sans-serif;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #1b1b1b;
}

div.coupon-system .web .title {
  background: #1b1b1b;
  color: #fff;
  padding: 16px 14px;
  text-align: center;
  font-weight: 900;
  font-size: 1.8rem;
  letter-spacing: .02em;
}

/* ※ .web .em → .web .title .em に統合 */
div.coupon-system .web .title .em {
  font-size: 1.8rem;
  color: #ffeb3b;
  font-weight: bold;
}

div.coupon-system .web .lead {
  padding: 14px 16px 10px;
  text-align: center;
  font-size: 1.2rem;
  color: #333;
  line-height: 1.75;
}

div.coupon-system .lead02 {
  padding: 5px;
  font-size: 18px;
  text-align: center;
  font-weight: bold;
  margin-top: 15px;
}

div.coupon-system .annotation {
  font-size: 1em;
  text-align: left;
  margin: 0 20px 20px 20px;
}

div.coupon-system .attention {
  font-size: 1rem;
  line-height: 1.8;
  text-align: left;
  margin-bottom: 10px;
}

/* ----------------------------------------------------------
 *  アコーディオン
 * ---------------------------------------------------------- */
div.coupon-system .accordion {
  padding: 16px;
  background: #ebeaea;
}

div.coupon-system .toggle {
  display: none;
}

div.coupon-system .Label {
  padding: 1em;
  display: block;
  color: #000;
  font-size: 1.2rem;
}

div.coupon-system .Label,
div.coupon-system .content {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: all 0.3s;
}

div.coupon-system .content {
  height: 0;
  margin-bottom: 10px;
  padding: 0 20px;
  overflow: hidden;
}

div.coupon-system .toggle:checked+.Label+.content {
  height: auto;
  padding: 20px;
  transition: all .3s;
}

/* ----------------------------------------------------------
 *  クーポンコピーエリア
 * ---------------------------------------------------------- */
div.coupon-system .coupon_copy {
  padding: 6px 16px 18px;
}

/* .copy：既存 margin/width 保持＆新デザインで上書き */
div.coupon-system .copy {
  margin: 4px auto 16px;
  width: 90%;
  background: #fff;
  border: 2px solid #1b1b1b;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .10);
}

div.coupon-system .copy_lead {
  font-weight: 900;
  font-size: 1.6rem;
  margin: 0 0 12px;
  padding: 0 0 10px;
  color: #1b1b1b;
  border-bottom: 1px dashed #cfcfcf;
  text-align: center;
}

div.coupon-system .area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-radius: 5px;
  background-color: #fff;
  padding: 5px;
}

/* .copy_area：coupon-system.css 上部の cursor/transition 保持＆新デザインで上書き */
div.coupon-system .copy_area {
  width: min(520px, 100%);
  text-align: center;
  font-size: clamp(26px, 4.2vw, 42px);
  font-weight: 900;
  color: #d32f2f;
  letter-spacing: .10em;
  padding: 10px 12px;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all .2s;
}

div.coupon-system .copy_area:hover {
  opacity: .8;
}

div.coupon-system .copy_area.ms-copied {
  color: #2e7d32 !important;
}

div.coupon-system .copy_area a {
  padding: 5px;
  font-size: 1.5em;
  font-weight: bold;
  margin-top: 20px;
  color: red;
  text-decoration: none;
}

div.coupon-system .tap {
  font-size: 30px;
  font-weight: bold;
}

/* ----------------------------------------------------------
 *  SP
 * ---------------------------------------------------------- */
@media (max-width: 768px) {
  div.coupon-system .ms-coupon-overlay {
    align-items: flex-end;
  }

  div.coupon-system .ms-coupon-modal {
    width: 100%;
    max-width: none;
    border-radius: 14px 14px 0 0;
    max-height: 75vh;
  }

  @keyframes msCouponSlideIn {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  div.coupon-system #title {
    font-size: 1.2rem;
  }

  div.coupon-system .Label {
    font-size: 1rem;
  }

  div.coupon-system .attention {
    font-size: 1rem;
    line-height: 1.8;
  }
}


div.coupon-system .accordion {
  box-sizing: border-box;
  max-width: 804px;
  margin: 0 auto 20px;
  border: 2px solid var(--ms_blue, #006EB2);
  border-radius: 10px;
  overflow: hidden;
  background: #fff
}

/* 変更後 */
div.coupon-system .coupon-acc-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 1.2rem;
  /* .Label に合わせた */
  color: var(--ms_blue, #006EB2);
  background: none;
  border: none;
  padding: 0 8px;
  cursor: pointer;
  box-sizing: border-box;
}

div.coupon-system .coupon-acc-trigger:hover {
  background: rgba(0, 110, 178, .05);
}

div.coupon-system .coupon-acc-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ms_blue, #006EB2);
}

div.coupon-system .coupon-acc-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ms_blue, #006EB2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

/* 展開エリアに上線 */
div.coupon-system .coupon-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-top: 0px solid var(--c-border);
}

div.coupon-system .coupon-acc-inner {
  padding: 12px 14px;
}

div.coupon-system .coupon-acc-trigger[aria-expanded="true"] .coupon-acc-icon {
  transform: rotate(180deg);
}

div.coupon-system .coupon-acc-trigger[aria-expanded="true"]+.coupon-acc-body {
  border-top-width: 1px;
}



/* ========================================
   クーポン利用案内
   ======================================== */
div.coupon-system .coupon-guide {
  font-family: var(--ff-base);
  font-size: var(--fs-sm);
  text-align: left;
  color: var(--c-text);
  line-height: 1.7;
  max-width: 730px;
}

div.coupon-system .coupon-guide .cg-notice {
  background: var(--gold200);
  border: 1px solid var(--gold300);
  padding: 2px 0;
  margin-bottom: var(--space-element, 1rem);
}

div.coupon-system .coupon-guide .cg-notice summary {
  padding: 9px 14px;
  cursor: pointer;
  font-size: var(--fs-xs);
  color: var(--gold800);
  font-weight: bold;
  list-style: none;
  display: flex;
  justify-content: space-between;
}

div.coupon-system .coupon-guide .cg-notice summary::after {
  content: "\25BC";
}

div.coupon-system .coupon-guide .cg-notice[open] summary::after {
  content: "\25B2";
}

div.coupon-system .coupon-guide .cg-notice ul {
  margin: 0;
  padding: 0 14px 12px 28px;
  font-size: var(--fs-xs);
  list-style: none;
}

div.coupon-system .coupon-guide .cg-notice ul li {
  position: relative;
  margin: 4px 0;
}

div.coupon-system .coupon-guide .cg-notice ul li:before {
  position: absolute;
  left: -1.2rem;
  margin: 0;
  content: "\26A0";
}

div.coupon-system .coupon-guide .cg-step {
  display: flex;
  margin-bottom: var(--space-block);
  align-items: flex-start;
}

div.coupon-system .coupon-guide .cg-num {
  background: var(--ms_blue_dark);
  font-size: var(--fs-xs);
  color: #fff;
  font-weight: bold;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 2px 8px 0 0;
}

div.coupon-system .coupon-guide .cg-content {
  flex: 1;
}

div.coupon-system .coupon-guide .cg-content h3 {
  font-size: var(--fs-md);
  color: var(--ms_blue_dark);
  margin: 0 0 8px 0;
}

div.coupon-system .coupon-guide .cg-content .cg-ss {
  border: 1px dashed var(--gray200);
  background: var(--gray020);
  color: var(--gray400);
  font-size: var(--fs-xs);
  padding: var(--space-xs, 0.75rem);
  text-align: center;
  margin-top: 8px;
}

div.coupon-system .coupon-guide .cg-content .cg-ss img {
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

div.coupon-system .coupon-guide .cg-note {
  background: var(--blue100);
  border-left: 3px solid var(--c-primary);
  font-size: var(--fs-xs);
  padding: 7px 11px;
  margin-top: 8px;
}

div.coupon-system .coupon-guide hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 4px 0 16px;
}

div.coupon-system .cg-content img {
  margin: 8px 0 16px 0;
}

/* 追加 */
div.coupon-system .title-bottom {
  display: block;
  margin: 60px auto 0;
  text-align: center;
  font-size: 1.4rem;
  font-weight: bold;
}