/* ========================================
   チェックアウトページ専用スタイル
   terms.css をベースに拡張
======================================== */

/* ========================================
   共通レイアウト
======================================== */
.checkout-page-body {
    background: #fff;
    min-height: 100vh;
}

.checkout-main {
    background: #fff;
}

.checkout-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   ヘッダー（既存スタイル継承）
======================================== */
.header {
  background: #77d9c9;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 60px;
  width: auto;
}

.header-nav {
  display: flex;
  gap: 15px;
}

.header-nav a {
  color: #000;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: opacity 0.3s;
}

.header-nav a:hover {
  opacity: 0.7;
}

/* ========================================
   ヒーローセクション
======================================== */
.checkout-hero {
    background: #77d9c9;
    padding: 50px 20px;
    text-align: center;
}

.checkout-hero-title {
    font-family: "Noto Serif JP", serif;
    font-size: 26px;
    color: #000;
    margin-bottom: 12px;
    font-weight: 700;
}

.checkout-hero-subtitle {
    font-size: 13px;
    color: #000;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* 完了ページ用 */
.confirmation-hero {
    padding: 60px 20px;
}

.confirmation-check-icon {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.confirmation-check-icon svg {
    color: #77d9c9;
}

/* ========================================
   セクション共通
======================================== */
.checkout-section {
    padding: 40px 20px;
    background: #fff;
}

.checkout-section-alt {
    background: #f8f8f8;
}

.checkout-section-title {
    font-family: "Noto Serif JP", serif;
    font-size: 18px;
    color: #222;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #77d9c9;
}

/* ========================================
   プランカード
======================================== */
.checkout-plan-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #77d9c9;
    position: relative;
}

.checkout-plan-badge {
    position: absolute;
    top: -12px;
    left: 25px;
    background: #77d9c9;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 20px;
}

.checkout-plan-name {
    font-family: "Noto Serif JP", serif;
    font-size: 20px;
    color: #222;
    margin: 15px 0 10px;
    font-weight: 700;
    line-height: 1.5;
}

.checkout-plan-description {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.checkout-plan-price {
    margin: 20px 0;
    text-align: center;
}

.checkout-price-amount {
    font-family: "Noto Serif JP", serif;
    font-size: 42px;
    font-weight: 700;
    color: #222;
}

.checkout-price-period {
    font-size: 14px;
    color: #666;
}

.checkout-plan-features {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.checkout-plan-features li {
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    margin-bottom: 8px;
    padding-left: 24px;
    position: relative;
}

.checkout-plan-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #77d9c9;
    font-weight: 700;
}

/* ========================================
   ステップ表示
======================================== */
.checkout-steps {
    margin-bottom: 30px;
}

.checkout-step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    padding: 18px;
    background: #fff;
    border-left: 3px solid #77d9c9;
    border-radius: 0 8px 8px 0;
}

.checkout-step:last-child {
    margin-bottom: 0;
}

.checkout-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: #77d9c9;
    color: #000;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50%;
}

.checkout-step-content {
    flex: 1;
}

.checkout-step-text {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding-top: 3px;
}

.checkout-step-detail {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 5px 0 0;
}

/* ========================================
   注意事項リスト
======================================== */
.checkout-notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkout-notice-list li {
    font-size: 14px;
    color: #333;
    line-height: 1.9;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.checkout-notice-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #77d9c9;
    font-weight: 700;
}

/* ========================================
   ログイン済み通知
======================================== */
.checkout-logged-in-notice {
    background: #e8f8f5;
    border: 1px solid #77d9c9;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    text-align: center;
}

.checkout-logged-in-notice p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

/* ========================================
   PMProフォームのスタイル上書き
======================================== */
.checkout-form-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

/* PMPro フォーム全体 */
#pmpro_form {
    font-family: "Noto Sans JP", sans-serif;
}

/* セクションタイトル */
#pmpro_form .pmpro_checkout-fields legend,
#pmpro_form .pmpro_checkout h3 {
    font-family: "Noto Serif JP", serif;
    font-size: 16px;
    color: #222;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* 入力フィールド */
#pmpro_form input[type="text"],
#pmpro_form input[type="email"],
#pmpro_form input[type="password"],
#pmpro_form input[type="tel"],
#pmpro_form select,
#pmpro_form textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: "Noto Sans JP", sans-serif;
}

#pmpro_form input[type="text"]:focus,
#pmpro_form input[type="email"]:focus,
#pmpro_form input[type="password"]:focus,
#pmpro_form input[type="tel"]:focus,
#pmpro_form select:focus,
#pmpro_form textarea:focus {
    outline: none;
    border-color: #77d9c9;
    box-shadow: 0 0 0 3px rgba(119, 217, 201, 0.2);
}

/* ラベル */
#pmpro_form label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

/* 必須マーク */
#pmpro_form .pmpro_asterisk {
    color: #e74c3c;
}

/* フィールドグループ */
#pmpro_form .pmpro_checkout-field {
    margin-bottom: 20px;
}

/* Stripe カード要素 */
#pmpro_form .StripeElement,
#pmpro_form #pmpro_payment_information_fields .pmpro_card_number,
#pmpro_form .pmpro_payment-card-number {
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#pmpro_form .StripeElement--focus {
    border-color: #77d9c9;
    box-shadow: 0 0 0 3px rgba(119, 217, 201, 0.2);
}

/* 送信ボタン */
#pmpro_form .pmpro_btn,
#pmpro_form input[type="submit"],
#pmpro_form #pmpro_btn-submit {
    width: 100%;
    padding: 16px 30px;
    font-size: 16px;
    font-weight: 700;
    color: #000;
    background: #77d9c9;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: "Noto Sans JP", sans-serif;
    margin-top: 10px;
}

#pmpro_form .pmpro_btn:hover,
#pmpro_form input[type="submit"]:hover,
#pmpro_form #pmpro_btn-submit:hover {
    background: #5fc9b8;
    box-shadow: 0 4px 15px rgba(119, 217, 201, 0.4);
    transform: translateY(-1px);
}

/* エラーメッセージ */
#pmpro_form .pmpro_message,
#pmpro_form .pmpro_error {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

#pmpro_form .pmpro_error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

#pmpro_form .pmpro_success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* 価格表示部分（PMPro標準）を非表示 */
#pmpro_form #pmpro_level_cost,
#pmpro_form .pmpro_checkout-field-level_cost {
    display: none;
}

/* 不要な要素を非表示 */
#pmpro_form .pmpro_checkout-field-username,
#pmpro_form .pmpro_checkout-field-password,
#pmpro_form .pmpro_checkout-field-password2 {
    /* マジックリンク使用時はパスワード非表示 */
    /* display: none; */
}

/* チェックボックス・ラジオボタン */
#pmpro_form input[type="checkbox"],
#pmpro_form input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: #77d9c9;
}

/* 利用規約同意 */
#pmpro_form .pmpro_checkout-field-tos {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

/* ========================================
   完了ページ固有スタイル
======================================== */
.confirmation-message-box {
    background: #e8f8f5;
    border: 2px solid #77d9c9;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.confirmation-message-title {
    font-family: "Noto Serif JP", serif;
    font-size: 22px;
    color: #222;
    margin: 0 0 20px;
}

.confirmation-plan-info,
.confirmation-email-info {
    font-size: 14px;
    color: #333;
    margin: 10px 0;
}

.confirmation-steps .checkout-step-content {
    padding-top: 0;
}

/* CTA ボタン */
.confirmation-cta-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
}

.confirmation-cta-btn {
    display: block;
    padding: 16px 30px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s;
}

.confirmation-cta-primary {
    background: #77d9c9;
    color: #000;
}

.confirmation-cta-primary:hover {
    background: #5fc9b8;
    box-shadow: 0 4px 15px rgba(119, 217, 201, 0.4);
}

.confirmation-cta-secondary {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.confirmation-cta-secondary:hover {
    background: #f8f8f8;
    border-color: #77d9c9;
}

.confirmation-subscription-note {
    text-align: center;
    margin-top: 20px;
}

.confirmation-subscription-note p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* サポートボックス */
.confirmation-support-box {
    background: #fff;
    border-left: 3px solid #77d9c9;
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

.confirmation-support-box p {
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    margin: 0 0 15px;
}

.confirmation-support-link {
    display: inline-block;
    color: #77d9c9;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.confirmation-support-link:hover {
    text-decoration: underline;
}

/* ========================================
   戻るボタン
======================================== */
.checkout-back {
    padding: 40px 20px;
    text-align: center;
    background: #fff;
}

.btn-back {
    display: inline-block;
    background: transparent;
    color: #333;
    text-decoration: none;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #77d9c9;
    border-color: #77d9c9;
    color: #000;
}

/* ========================================
   フッター（既存スタイル継承）
======================================== */
/* ========================================
   フッター
======================================== */
.footer {
    background: #77d9c9;
    padding: 40px 20px 30px;
    text-align: center;
}

.footer-sns {
    margin-bottom: 30px;
}

.footer-sns-title {
    color: #000;
    font-size: 12px;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.sns-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.sns-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #000;
    text-decoration: none;
    border: 1px solid rgba(1, 1, 1, 0.5);
    transition: all 0.3s;
}

.sns-link svg {
    width: 24px;
    height: 24px;
}

.sns-link:hover {
    background: #fff;
    color: #77d9c9;
    border-color: #fff;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(1, 1, 1, 0.9);
    text-decoration: none;
    font-size: 11px;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.7;
}

.footer-copyright {
    color: rgba(1, 1, 1, 0.8);
    font-size: 11px;
}

/* ========================================
   レスポンシブ対応
======================================== */
@media (max-width: 768px) {
    .checkout-hero {
        padding: 40px 15px;
    }

    .checkout-hero-title {
        font-size: 22px;
    }

    .checkout-section {
        padding: 30px 15px;
    }

    .checkout-container {
        padding: 0 15px;
    }

    .checkout-plan-card {
        padding: 25px 20px;
    }

    .checkout-plan-name {
        font-size: 18px;
    }

    .checkout-price-amount {
        font-size: 36px;
    }

    .checkout-step {
        padding: 15px;
    }

    .checkout-form-wrapper {
        padding: 20px 15px;
    }

    #pmpro_form input[type="text"],
    #pmpro_form input[type="email"],
    #pmpro_form input[type="password"],
    #pmpro_form input[type="tel"],
    #pmpro_form select {
        padding: 12px 14px;
        font-size: 16px;
        /* iOS zoom防止 */
    }

    .confirmation-cta-box {
        max-width: 100%;
    }

    /* フッター */
    .footer {
        padding: 30px 15px 20px;
    }

    .footer-sns-title {
        font-size: 14px;
    }

    .sns-links {
        gap: 15px;
    }

    .sns-link {
        width: 44px;
        height: 44px;
    }

    .sns-link svg {
        width: 22px;
        height: 22px;
    }

    .footer-links {
        flex-direction: column;
    }

    .footer-links a {
        font-size: 12px;
    }

    .footer-copyright {
        font-size: 10px;
    }
}

/* ========================================
   ワークショップ別カラー
======================================== */
/* 怒りワークショップ 
.checkout-plan-card[style*="#e74c3c"] .checkout-plan-features li::before {
    color: #e74c3c;
}*/

/* 寂しさワークショップ 
.checkout-plan-card[style*="#3498db"] .checkout-plan-features li::before {
    color: #3498db;
}*/