/* ========================================
   詳細プラン表 - スタイリッシュデザイン
======================================== */

.detailed-pricing-plans {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 40px 0;
  overflow-x: visible;
  overflow-y: visible;
}

/* プランカテゴリー */
.plan-category {
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  width: 100%;
  margin: 0 auto;
}

/* カテゴリーヘッダー */
.category-header {
  padding: 30px 40px;
  color: white;
  text-align: left;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

.category-header h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 10px 0;
  letter-spacing: 0.02em;
}

.category-subtitle {
  font-size: 0.95rem;
  margin: 0;
  opacity: 0.95;
  font-weight: 500;
}

/* Eメールヘッダー */
.email-header {
  background: linear-gradient(135deg, #4FA5E6 0%, #6BB6EA 50%, #3394E1 100%);
}

/* LINEヘッダー */
.line-header {
  background: linear-gradient(135deg, #00B900 0%, #06C755 100%);
}

/* SMSヘッダー */
.sms-header {
  background: linear-gradient(135deg, #ff567d 0%, #ff3366 100%);
}

/* プランオプション */
.plan-options {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  border-top: none;
  width: 100%;
}

.plan-option {
  padding: 20px 10px;
  text-align: center;
  border-right: 1px solid #e8e9ea;
  border-bottom: 1px solid #e8e9ea;
  position: relative;
  background: #ffffff;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  cursor: pointer;
  border-radius: 0;
  box-sizing: border-box;
  width: 100%;
}

.plan-option:hover {
  background: #f8f9fa;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.plan-option.selected {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #4FA5E6;
  box-shadow: 0 8px 24px rgba(79, 165, 230, 0.3);
  transform: translateY(-3px);
  z-index: 2;
}

.line-plans .plan-option.selected {
  background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%);
  border-color: #00B900;
  box-shadow: 0 8px 24px rgba(0, 185, 0, 0.3);
}

.sms-plans .plan-option.selected {
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4e6 100%);
  border-color: #ff567d;
  box-shadow: 0 8px 24px rgba(255, 86, 125, 0.3);
}

/* 最後の行の右端のボーダーを削除 */
.plan-option:last-child {
  border-right: none;
}

/* 人気バッジ */
.popular-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #FF4444 0%, #CC0000 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* プラン人気強調 */
.plan-option.popular {
  background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%);
}

/* プランアイコン */
.plan-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-icon-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
}

/* プラン名 */
.plan-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 6px;
  line-height: 1.2;
}

/* プラン制限 */
.plan-limit {
  font-size: 0.7rem;
  color: #64748b;
  margin-bottom: 8px;
  line-height: 1.2;
  min-height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* プラン価格 */
.plan-pricing {
  font-size: 1.2rem;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.email-plans .plan-option .plan-pricing {
  background: linear-gradient(135deg, #4FA5E6 0%, #3394E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.line-plans .plan-option .plan-pricing {
  background: linear-gradient(135deg, #00B900 0%, #06C755 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sms-plans .plan-option .plan-pricing {
  background: linear-gradient(135deg, #ff567d 0%, #ff3366 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 料金シミュレーションセクション */
.pricing-simulator-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  scroll-margin-top: 80px;
  overflow: visible;
}

/* 合計表示セクション */
.pricing-summary {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid #e8e9ea;
}

.summary-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2c3e50;
}

.summary-breakdown {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 0.95rem;
  color: #64748b;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.summary-total-label {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 5px;
}

.summary-total-price {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #4FA5E6 0%, #3394E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* LINEプランとSMSプランの列数調整 */
.line-plans .plan-options {
  grid-template-columns: repeat(4, 1fr);
}

.sms-plans .plan-options {
  grid-template-columns: repeat(7, 1fr);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .plan-options {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  .line-plans .plan-options {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .sms-plans .plan-options {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .pricing-simulator-section {
    padding: 60px 0;
  }

  .detailed-pricing-plans {
    gap: 20px;
    padding: 20px 12px;
  }

  .category-header {
    padding: 20px 15px;
  }

  .category-header h3 {
    font-size: 1.3rem;
  }

  .category-subtitle {
    font-size: 0.8rem;
  }

  .plan-options {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .plan-option {
    padding: 20px 15px;
    min-height: 160px;
  }

  .plan-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .plan-icon-img {
    width: 50px;
    height: 50px;
  }

  .plan-name {
    font-size: 0.9rem;
  }

  .plan-limit {
    font-size: 0.75rem;
    min-height: 2rem;
  }

  .plan-pricing {
    font-size: 1.4rem;
  }

  .pricing-summary {
    flex-direction: column;
    gap: 20px;
    padding: 25px 20px;
  }

  .summary-breakdown {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .summary-total {
    align-items: center;
    width: 100%;
  }

  .summary-total-price {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .category-header {
    padding: 20px 15px;
  }

  .category-header h3 {
    font-size: 1.3rem;
  }

  .category-subtitle {
    font-size: 0.8rem;
  }

  /* スワイパーコンテナ */
  .plan-options {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .plan-options::-webkit-scrollbar {
    display: none;
  }

  .plan-option {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    margin: 0 10px;
    min-width: calc(100% - 20px);
    border-right: 1px solid #e8e9ea;
    border-radius: 0 0 8px 8px;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
  }

  .plan-option:first-child {
    margin-left: 10px;
  }

  .plan-option:last-child {
    margin-right: 10px;
    border-right: 1px solid #e8e9ea;
  }

  /* カードのホバー効果をモバイルでは無効化 */
  .plan-option:hover {
    transform: none;
  }

  /* アクティブなカードを強調 */
  .plan-option.in-view {
    opacity: 1;
    transform: scale(1);
  }

  .plan-option:not(.in-view) {
    opacity: 0.7;
    transform: scale(0.95);
  }

  /* スワイプインジケーター */
  .plan-category {
    position: relative;
  }

  .plan-category::after {
    content: '← スワイプして他のプランを見る →';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    padding: 15px 8px;
    animation: swipe-hint 2s ease-in-out infinite;
  }

  @keyframes swipe-hint {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.5;
    }
  }

  /* ドットインジケーター */
  .simulator-dots-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
  }

  .simulator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .simulator-dot.active {
    width: 24px;
    border-radius: 4px;
  }

  /* Eメールプラン用のドット */
  .email-plans .simulator-dot.active {
    background: #4FA5E6;
  }

  /* LINEプラン用のドット */
  .line-plans .simulator-dot.active {
    background: #00B900;
  }

  /* SMSプラン用のドット */
  .sms-plans .simulator-dot.active {
    background: #ff567d;
  }
}
