/**
 * coupon-timer.css - 時限式クーポン + コード入力クーポン
 * area-config.php の coupons.timed.enabled / coupons.code_input.enabled で制御
 */

/* =================================================================
 * 共通: 非表示状態
 * ================================================================= */
.tc-hidden {
  opacity: 0 !important;
  transform: scale(0.9);
  pointer-events: none;
}

/* =================================================================
 * オーバーレイ
 * ================================================================= */
#tc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#tc-overlay:not(.tc-hidden) {
  opacity: 1;
}

/* =================================================================
 * ポップアップ本体
 * ================================================================= */
#tc-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 380px;
  background: #FD4A4B;
  border-radius: 15px;
  padding: 20px;
  z-index: 9999;
  color: #fff;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
#tc-popup:not(.tc-hidden) {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* 閉じるボタン */
.tc-close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #333;
  color: #fff;
  border: 2px solid #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 30px;
}

/* テキスト */
.tc-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 4px;
}
.tc-amount {
  font-size: 1.5rem;
  margin: 10px 0;
  font-weight: bold;
}
.tc-price {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
}
.tc-subtitle {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 8px;
}

/* アクション促進テキスト */
.tc-action-prompt {
  background: #fff;
  color: #333;
  padding: 12px 10px;
  border-radius: 8px;
  margin: 15px 0;
  font-size: 0.9rem;
  font-weight: bold;
  line-height: 1.5;
}
.tc-action-prompt .tc-highlight {
  color: #FD4A4B;
  font-weight: 900;
}

/* 確定ボタン */
.tc-apply-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: #fff;
  color: #FD4A4B;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin: 0 0 15px;
}
.tc-apply-btn:hover {
  background: #f0f0f0;
}
.tc-apply-btn.is-applied {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
  cursor: default;
}

/* タイマー */
.tc-timer-wrap {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  padding: 8px;
  margin-bottom: 10px;
}
.tc-timer {
  font-weight: bold;
  font-size: 1.2rem;
}

/* 注記 */
.tc-notes {
  font-size: 0.75rem;
  text-align: left;
  line-height: 1.6;
  opacity: 0.9;
  margin-top: 15px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}
.tc-notes p {
  margin: 0;
}

/* =================================================================
 * 最小化アイコン（右下フローティング）
 * ================================================================= */
#tc-minimized {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 9990;
  color: #fff;
  padding: 10px 35px 10px 10px;
  background: #FD4A4B;
  border-radius: 10px;
  display: flex;
  align-items: center;
  min-width: 150px;
  box-sizing: border-box;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
#tc-minimized:not(.tc-hidden) {
  opacity: 1;
  transform: translateY(0);
}
#tc-minimized.is-applied {
  background: #28a745;
}
.tc-min-icon {
  font-size: 2rem;
  margin-right: 10px;
  cursor: pointer;
}
.tc-min-text {
  font-size: 0.8rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

/* 収納ボタン（<） */
.tc-stow-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 25px;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  transition: background 0.2s;
}
.tc-stow-btn:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* =================================================================
 * 収納タブ（右端スライドイン）
 * ================================================================= */
#tc-stowed-tab {
  position: fixed;
  bottom: 100px;
  right: 0;
  z-index: 9989;
  width: 50px;
  height: 50px;
  background: #FD4A4B;
  border-radius: 10px 0 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease, transform 0.3s ease;
  transform: translateX(100%);
}
#tc-stowed-tab:not(.tc-hidden) {
  transform: translateX(0);
}
#tc-stowed-tab.is-applied {
  background: #28a745;
}
.tc-stowed-icon {
  font-size: 1.8rem;
}

/* =================================================================
 * フォーム内クーポン適用表示
 * ================================================================= */
.tc-applied-message {
  margin-top: 4px;
  padding: 0;
  background: none;
  color: #4a7c59;
  font-size: 0.8rem;
  font-weight: 500;
}

/* =================================================================
 * クーポン統合セクション
 * ================================================================= */
.coupon-section {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 0;
}
.coupon-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.coupon-item-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #888;
  margin-bottom: 2px;
}
.coupon-code-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.coupon-code-input:focus {
  border-color: #E33E3B;
  outline: none;
  box-shadow: 0 0 0 2px rgba(227, 62, 59, 0.15);
}
/* クーポンステータス表示 */
.coupon-timed-status {
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 4px;
}
.coupon-timed-status.is-pending {
  color: #c0392b;
}
.coupon-timed-status.is-applied {
  color: #4a7c59;
}
.coupon-code-note {
  font-size: 0.75rem;
  color: #888;
  margin-top: 6px;
}
