/* ========================================
   料金プラン一覧タブセクション
======================================== */

.pricing-plans-section {
  padding: 20px;
  overflow: visible;
}

/* タブナビゲーション */
.pricing-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  border-bottom: 3px solid #e0e0e0;
  flex-wrap: wrap;
}

.pricing-tab {
  background: none;
  border: none;
  padding: 18px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 4px solid transparent;
  margin-bottom: -3px;
}

.pricing-tab svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.pricing-tab:hover svg {
  transform: scale(1.1);
}

/* Eメールタブ */
.pricing-tab[data-channel="email"]:hover {
  color: #4FA5E6;
  background: rgba(79, 165, 230, 0.05);
}

.pricing-tab[data-channel="email"].active {
  color: #4FA5E6;
  border-bottom-color: #4FA5E6;
  font-weight: 700;
}

.pricing-tab[data-channel="email"].active svg {
  color: #4FA5E6;
}

/* LINEタブ */
.pricing-tab[data-channel="line"]:hover {
  color: #00B900;
  background: rgba(0, 185, 0, 0.05);
}

.pricing-tab[data-channel="line"].active {
  color: #00B900;
  border-bottom-color: #00B900;
  font-weight: 700;
}

.pricing-tab[data-channel="line"].active svg {
  color: #00B900;
}

/* SMSタブ */
.pricing-tab[data-channel="sms"]:hover {
  color: #ff567d;
  background: rgba(255, 86, 125, 0.05);
}

.pricing-tab[data-channel="sms"].active {
  color: #ff567d;
  border-bottom-color: #ff567d;
  font-weight: 700;
}

.pricing-tab[data-channel="sms"].active svg {
  color: #ff567d;
}

/* タブコンテンツ */
.pricing-tab-content {
  min-height: 400px;
  overflow: visible;
}

.pricing-channel-plans {
  display: none;
  animation: fadeIn 0.4s ease;
  overflow: visible;
}

.pricing-channel-plans.active {
  display: block;
  overflow: visible;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 料金タイル */
.pricing-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
  padding: 20px 0;
  overflow: visible;
}

/* 大画面では最大4カラムに制限 */
@media (min-width: 1400px) {
  .pricing-tiles {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.pricing-tile {
  background: #ffffff;
  border: 2px solid #e8e8e8;
  border-radius: 16px;
  padding: 24px 18px 20px 18px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background-clip: padding-box;
}

.pricing-tile:hover {
  transform: translateY(-8px);
}

/* Eメールプランのスタイル */
#email-plans .pricing-tile {
  border-color: #87CEEB;
  border-width: 2px;
}

#email-plans .pricing-tile:hover {
  box-shadow: 0 12px 40px rgba(79, 165, 230, 0.15);
  border-color: #87CEEB;
}

#email-plans .pricing-tile.recommended {
  border: 2px solid #87CEEB;
  box-shadow: 0 8px 30px rgba(79, 165, 230, 0.2);
  background-clip: padding-box;
}

#email-plans .recommended-badge {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

#email-plans .price-currency {
  color: #2c3e50;
}

#email-plans .price-amount {
  color: #4FA5E6;
}

/* LINEプランのスタイル */
#line-plans .pricing-tile {
  border-color: #00B900;
  border-width: 2px;
}

#line-plans .pricing-tile:hover {
  box-shadow: 0 12px 40px rgba(0, 185, 0, 0.15);
  border-color: #00B900;
}

#line-plans .pricing-tile.recommended {
  border: 2px solid #00B900;
  box-shadow: 0 8px 30px rgba(0, 185, 0, 0.2);
  background-clip: padding-box;
}

#line-plans .recommended-badge {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

#line-plans .price-currency {
  color: #2c3e50;
}

#line-plans .price-amount {
  color: #00B900;
}

/* SMSプランのスタイル */
#sms-plans .pricing-tile {
  border-color: #ff567d;
  border-width: 2px;
}

#sms-plans .pricing-tile:hover {
  box-shadow: 0 12px 40px rgba(255, 86, 125, 0.15);
  border-color: #ff567d;
}

#sms-plans .pricing-tile.recommended {
  border: 2px solid #ff567d;
  box-shadow: 0 8px 30px rgba(255, 86, 125, 0.2);
  background-clip: padding-box;
}

#sms-plans .recommended-badge {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

#sms-plans .price-currency {
  color: #2c3e50;
}

#sms-plans .price-amount {
  color: #ff567d;
}

/* おすすめバッジ共通スタイル */
.recommended-badge {
  position: absolute;
  top: 0;
  right: 0;
  color: white;
  padding: 6px 16px;
  border-radius: 0 14px 0 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 10;
}

/* タイルヘッダー */
.tile-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
  flex-wrap: wrap;
  gap: 8px;
}

.tile-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  text-align: center;
  width: 100%;
}

/* バッジスタイル */
.tile-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tile-badge.free {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
  color: white;
}

.tile-badge.basic {
  background: linear-gradient(135deg, #4FA5E6 0%, #3394E1 100%);
  color: white;
}

.tile-badge.standard {
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  color: white;
}

.tile-badge.pro {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

.tile-badge.sms {
  background: linear-gradient(135deg, #ff567d 0%, #e74c6c 100%);
  color: white;
}

/* 価格表示 */
.tile-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 16px 0 20px 0;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.price-currency {
  font-size: 1.3rem;
  font-weight: 600;
}

.price-amount {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  word-break: keep-all;
  white-space: nowrap;
}

.price-period {
  font-size: 1rem;
  color: #7f8c8d;
  font-weight: 500;
}

/* 機能リスト */
.tile-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  margin-bottom: 16px;
}

.tile-feature {
  display: flex;
  align-items: flex-start;
  font-size: 0.85rem;
  color: #34495e;
  line-height: 1.4;
  padding-left: 4px;
  text-align: left;
}

/* 無料トライアルボタン - デフォルト（Eメール用） */
.tile-trial-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 28px;
  background: linear-gradient(135deg, #87CEEB 0%, #5DADE2 100%);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(93, 173, 226, 0.3);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  margin-top: auto;
  margin-bottom: 0;
}

.tile-trial-button:hover {
  background: linear-gradient(135deg, #5DADE2 0%, #4FA5E6 100%);
  box-shadow: 0 6px 16px rgba(93, 173, 226, 0.4);
  transform: translateY(-2px);
}

.tile-trial-button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* LINEプラン用ボタン - 緑色 */
#line-plans .tile-trial-button {
  background: linear-gradient(135deg, #00B900 0%, #06C755 100%);
  box-shadow: 0 4px 12px rgba(0, 185, 0, 0.3);
}

#line-plans .tile-trial-button:hover {
  background: linear-gradient(135deg, #06C755 0%, #00D800 100%);
  box-shadow: 0 6px 16px rgba(0, 185, 0, 0.4);
  transform: translateY(-2px);
}

/* SMSプラン用ボタン - ピンク色 */
#sms-plans .tile-trial-button {
  background: linear-gradient(135deg, #ff567d 0%, #ff3366 100%);
  box-shadow: 0 4px 12px rgba(255, 86, 125, 0.3);
}

#sms-plans .tile-trial-button:hover {
  background: linear-gradient(135deg, #ff3366 0%, #ff1a4d 100%);
  box-shadow: 0 6px 16px rgba(255, 86, 125, 0.4);
  transform: translateY(-2px);
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
  .pricing-tiles {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (max-width: 992px) {
  .pricing-tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .pricing-tabs {
    flex-direction: column;
    border-bottom: none;
    gap: 10px;
  }

  .pricing-tab {
    width: 100%;
    justify-content: center;
    border-bottom: none;
    border-left: 4px solid transparent;
    margin-bottom: 0;
    padding: 16px 20px;
    border-radius: 8px;
  }

  .pricing-tab[data-channel="email"].active {
    border-left-color: #4FA5E6;
    border-bottom-color: transparent;
    background: rgba(79, 165, 230, 0.1);
  }

  .pricing-tab[data-channel="line"].active {
    border-left-color: #00B900;
    border-bottom-color: transparent;
    background: rgba(0, 185, 0, 0.1);
  }

  .pricing-tab[data-channel="sms"].active {
    border-left-color: #ff567d;
    border-bottom-color: transparent;
    background: rgba(255, 86, 125, 0.1);
  }

  .pricing-tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .tile-price {
    margin: 16px 0;
  }

  .price-amount {
    font-size: 2.2rem;
  }

  .tile-trial-button {
    padding: 14px 22px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  /* 料金シミュレーションボタンのテキストサイズ調整 */
  .pricing-info-box a,
  a[href="#pricing-simulator"] {
    font-size: 0.9rem !important;
    padding: 12px 24px !important;
    white-space: nowrap !important;
  }

  .pricing-tabs {
    flex-direction: row;
    border-bottom: 3px solid #e0e0e0;
    gap: 0;
  }

  .pricing-tab {
    font-size: 0.75rem;
    padding: 12px 8px;
    width: auto;
    flex: 1;
    border-left: none;
    border-bottom: 4px solid transparent;
    margin-bottom: -3px;
    border-radius: 0;
    background: none !important;
  }

  .pricing-tab[data-channel="email"].active {
    border-left-color: transparent;
    border-bottom-color: #4FA5E6;
    background: rgba(79, 165, 230, 0.05) !important;
  }

  .pricing-tab[data-channel="line"].active {
    border-left-color: transparent;
    border-bottom-color: #00B900;
    background: rgba(0, 185, 0, 0.05) !important;
  }

  .pricing-tab[data-channel="sms"].active {
    border-left-color: transparent;
    border-bottom-color: #ff567d;
    background: rgba(255, 86, 125, 0.05) !important;
  }

  .pricing-tab span {
    font-size: 0.7rem;
  }

  .pricing-tab svg {
    width: 18px;
    height: 18px;
  }

  /* スワイパーコンテナ */
  .pricing-tiles {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    padding: 20px 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;
  }

  .pricing-tiles::-webkit-scrollbar {
    display: none;
  }

  .pricing-tile {
    padding: 20px 16px;
    min-height: 280px;
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    margin: 0 10px;
    min-width: calc(100% - 20px);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
  }

  .tile-header h4 {
    font-size: 1rem;
  }

  .price-amount {
    font-size: 2.2rem;
  }

  .tile-feature {
    font-size: 0.8rem;
  }

  .tile-trial-button {
    padding: 12px 18px;
    font-size: 0.8rem;
    gap: 8px;
  }

  .tile-trial-button svg {
    width: 16px;
    height: 16px;
  }

  /* スワイプインジケーター */
  .pricing-channel-plans {
    position: relative;
  }

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

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

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

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

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

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

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

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

  /* スクロールスナップの調整 */
  .pricing-tiles {
    scroll-padding: 10px;
    will-change: scroll-position;
  }

  /* タイルの境界をより明確に */
  .pricing-tile:first-child {
    margin-left: 10px;
  }

  .pricing-tile:last-child {
    margin-right: 10px;
  }

  /* スクロール中のスムーズな動き */
  .pricing-tiles.scrolling .pricing-tile {
    pointer-events: none;
  }

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

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

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

/* より小さい画面用の追加調整 */
@media (max-width: 360px) {
  .pricing-info-box a,
  a[href="#pricing-simulator"] {
    font-size: 0.8rem !important;
    padding: 10px 20px !important;
  }
}
