/* ============================================================
 * 会員/ロイヤリティ共通 フィードバック基盤(改善フェーズ P5-3)
 *   native alert()/confirm() を置き換えるトースト & 確認ダイアログのスタイル。
 *   会員(style.css)・ロイヤリティ(loyalty.css)いずれのテーマにも依存しない
 *   自己完結スタイル(既存表示に影響しない加算的追加)。
 *   ブランドカラー(#e5006e)を差し色に、アクセシブルなコントラストで表示する。
 * ============================================================ */

/* ---- トースト ---- */
.msc-toast-region {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}

.msc-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #333;
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  animation: msc-toast-in 0.2s ease-out;
}

.msc-toast--error {
  background: #b3005a;
}
.msc-toast--success {
  background: #1a7f4b;
}

.msc-toast__body {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.msc-toast__close {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  opacity: 0.85;
}
.msc-toast__close:hover {
  opacity: 1;
}

@keyframes msc-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- 確認ダイアログ ---- */
.msc-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: msc-fade-in 0.15s ease-out;
}

.msc-dialog {
  background: #fff;
  color: #222;
  border-radius: 10px;
  width: min(92vw, 400px);
  padding: 22px 20px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.msc-dialog__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.msc-dialog__message {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.msc-dialog__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.msc-dialog__btn {
  appearance: none;
  border: 0;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  min-width: 96px;
  /* 指で押しやすい高さ(2026-11-03) */
  min-height: 44px;
}

.msc-dialog__btn--confirm {
  background: #e5006e;
  color: #fff;
}
.msc-dialog__btn--confirm:hover {
  background: #c70061;
}

.msc-dialog__btn--cancel {
  background: #e6e6e6;
  color: #333;
}
.msc-dialog__btn--cancel:hover {
  background: #d9d9d9;
}

@keyframes msc-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 動きを抑える設定を尊重(WCAG 2.3.3 / prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
  .msc-toast,
  .msc-dialog-overlay {
    animation: none;
  }
}
