/* TPH Subscription — Frontend CSS */

/* ── 全要素 box-sizing ─────────────────────────────────────────────────────── */
.tph-pricing-wrap,
.tph-pricing-wrap *,
.tph-pricing-wrap *::before,
.tph-pricing-wrap *::after {
  box-sizing: border-box;
}

/* ── ラッパー ──────────────────────────────────────────────────────────────── */
.tph-pricing-wrap {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 20px;
  font-family: inherit;
}

.tph-pricing-subtitle {
  font-size: 0.88rem;
  color: #777;
  line-height: 1.7;
  margin-bottom: 2rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid #c8a96e;
  background: #faf8f4;
  border-radius: 0 6px 6px 0;
}

.tph-pricing-step {
  margin-bottom: 2.5rem;
}

.tph-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid #c8a96e;
  color: #2d2d2d;
}

/* ── カテゴリブロック ──────────────────────────────────────────────────────── */
.tph-category {
  margin-bottom: 1.8rem;
}

.tph-category-title {
  display: flex !important;
  align-items: baseline !important;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4a4a4a;
  margin: 0 0 0.8rem 0;
  padding: 0;
}

.tph-category-sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: #999;
}

/* ── プランカードグリッド ───────────────────────────────────────────────────── */
.tph-plan-grid {
  display: grid !important;
  gap: 1rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 3列グリッド（定額プラン・振付） */
.tph-grid-3 {
  grid-template-columns: repeat(3, 1fr) !important;
}

/* 2列グリッド（回数券・単発） */
.tph-grid-2 {
  grid-template-columns: repeat(2, 1fr) !important;
}

/* ── プランカード ──────────────────────────────────────────────────────────────
   テーマが label に display:inline を当てるため !important で上書き必須。    */
.tph-plan-card {
  display: block !important;
  position: relative !important;
  overflow: hidden !important;
  cursor: pointer !important;
  border: 2px solid #e0d5c5;
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  background: #fff;
  float: none !important;
  width: 100% !important;
}

/* ラジオボタン本体は非表示 */
.tph-plan-card input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* カード内コンテンツ */
.tph-plan-inner {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.4rem;
  padding: 1rem;
  position: static !important;
  float: none !important;
  width: auto !important;
}

.tph-plan-card:hover {
  border-color: #c8a96e;
  box-shadow: 0 4px 16px rgba(200, 169, 110, 0.2);
  transform: translateY(-2px);
}

.tph-plan-card.is-selected {
  border-color: #c8a96e;
  background: #fffbf3;
  box-shadow: 0 4px 20px rgba(200, 169, 110, 0.3);
}

.tph-plan-card.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  background: #f5f5f5;
}

/* 注記テキスト（定額プランのみ等） */
.tph-plan-note {
  display: block !important;
  font-size: 0.72rem;
  color: #e07060;
  margin-top: 0.4rem;
  line-height: 1.4;
}

.tph-plan-name {
  display: block !important;
  font-size: 0.9rem;
  font-weight: 700;
  color: #2d2d2d;
}

.tph-plan-price {
  display: block !important;
  font-size: 1.25rem;
  font-weight: 800;
  color: #c8a96e;
  line-height: 1.2;
}

.tph-plan-price small {
  font-size: 0.72rem;
  font-weight: 400;
  color: #666;
}

.tph-plan-desc {
  display: block !important;
  font-size: 0.78rem;
  color: #666;
  line-height: 1.5;
}

/* バッジ共通 */
.tph-plan-badge {
  display: inline-block !important;
  background: #c8a96e;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 0.3rem;
  align-self: flex-start;
}

/* おすすめバッジ */
.tph-badge-recommend {
  background: #e07060;
  order: -1; /* カード内の先頭に表示 */
  margin-bottom: 0.2rem;
}

/* ── 合計・クーポン・ボタン ─────────────────────────────────────────────────── */
.tph-pricing-summary {
  background: #f9f6f0;
  border: 1px solid #e0d5c5;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.tph-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #2d2d2d;
}

.tph-total-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: #c8a96e;
}

.tph-coupon-row {
  margin-bottom: 1rem;
  width: 100%;
}

.tph-coupon-input {
  display: block !important;
  width: 100% !important;
  min-width: 0;
  padding: 0.6rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* ── ボタン ────────────────────────────────────────────────────────────────── */
.tph-btn {
  display: block !important;
  width: 100% !important;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-align: center;
  text-decoration: none;
}

.tph-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.tph-btn-primary {
  background: #c8a96e;
  color: #fff;
}

.tph-btn-primary:hover:not(:disabled) {
  background: #b8945a;
  transform: translateY(-1px);
}

.tph-btn-coral {
  display: inline-block !important;
  width: auto !important;
  background: #e07060;
  color: #fff;
  padding: 0.8rem 2rem;
}

.tph-btn-coral:hover:not(:disabled) {
  background: #cc5a4a;
}

.tph-note {
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.8rem;
  text-align: center;
  line-height: 1.5;
}

/* ── 体験レッスン ──────────────────────────────────────────────────────────── */
.tph-trial-wrap {
  background: #fff8f0;
  border: 2px solid #e07060;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 480px;
}

.tph-trial-price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.tph-strike {
  text-decoration: line-through;
  color: #999;
  font-size: 1rem;
}

.tph-trial-special {
  font-size: 1.1rem;
  color: #e07060;
}

.tph-trial-desc {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

/* ── 通知 ─────────────────────────────────────────────────────────────────── */
.tph-notice {
  padding: 1rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.tph-notice-info {
  background: #e8f4fd;
  border-left: 4px solid #3498db;
  color: #2c3e50;
}

/* ── レスポンシブ ─────────────────────────────────────────────────────────── */

@media (max-width: 700px) {
  .tph-grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .tph-grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .tph-pricing-summary,
  .tph-trial-wrap {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .tph-plan-inner {
    padding: 0.8rem;
  }
  .tph-plan-price {
    font-size: 1.1rem;
  }
  .tph-pricing-summary {
    padding: 1rem;
  }
  .tph-pricing-wrap {
    padding: 0 12px;
  }
}

@media (max-width: 360px) {
  .tph-grid-3,
  .tph-grid-2 {
    grid-template-columns: 1fr !important;
  }
}
