/* ==================================================
   EAA MemberPress Checkout
================================================== */


/* ==================================================
   購入ページ全体
================================================== */

.eaa-purchase-page {
    padding: 48px 20px 72px;
}

.eaa-purchase-inner {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}


/* ==================================================
   商品情報
================================================== */

.eaa-purchase-header {
    margin-bottom: 36px;
}

.eaa-purchase-label {
    margin: 0 0 8px;
    font-size: 15px;
    color: #222;
}

.eaa-purchase-title {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 1.5;
    font-weight: 700;
    color: #0b2d55;
}

.eaa-purchase-price {
    margin: 0;
    font-size: 16px;
    color: #111;
}

.eaa-purchase-price strong {
    margin-left: 8px;
    font-size: 20px;
    color: #111;
}

.eaa-purchase-price span {
    margin-left: 4px;
    font-size: 13px;
    color: #777;
}

.eaa-checkout-course-image {
    width: 100%;
    max-width: 280px;
    margin: 0 0 28px;
}

.eaa-checkout-course-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.eaa-purchase-product {
    display: flex;
    align-items: center;
    gap: 28px;
}

.eaa-purchase-thumbnail {
    flex: 0 0 170px;
}

.eaa-purchase-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.eaa-purchase-product-info {
    flex: 1;
    min-width: 0;
}

.eaa-purchase-description {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}

/* ==================================================
   MemberPressフォーム全体
================================================== */

.eaa-checkout-wrapper {
    margin-top: 32px;
}

.eaa-checkout-intro {
    padding-top: 28px;
    border-top: 1px solid #e4e8ed;
}

.eaa-checkout-title {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.5;
    color: #0b2d55;
}

.eaa-checkout-lead {
    margin: 0 0 24px;
    color: #111;
}


/* ==================================================
   新規 / ログイン 選択
================================================== */

.eaa-checkout-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.eaa-checkout-choice-box {
    padding: 28px;
    border: 1px solid #dfe5eb;
    border-radius: 10px;
    background: #fff;
}

.eaa-checkout-choice-box h2 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    color: #0b2d55;
}

.eaa-checkout-choice-box p {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.8;
    color: #111;
}


/* ==================================================
   共通ボタン
================================================== */

.eaa-checkout-choice-button,
.eaa-checkout-wrapper .mepr-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 6px;
    background: #0b2d55;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.eaa-checkout-choice-button:hover,
.eaa-checkout-wrapper .mepr-submit:hover {
    opacity: 0.88;
    color: #fff;
}

/* 新規登録ボタン */
.eaa-checkout-choice-button.eaa-checkout-register-button {
    background: #1767a8;
    color: #fff;
}

.eaa-checkout-choice-button.eaa-checkout-register-button:hover {
    background: #125588;
    color: #fff;
    opacity: 1;
}


/* ==================================================
   新規アカウント登録フォーム
================================================== */

.eaa-checkout-form-area {
    margin-top: 32px;
}

.eaa-new-account-fields {
    margin-top: 24px;
}

.eaa-new-account-title {
    margin: 0 0 6px;
    font-size: 20px;
    color: #0b2d55;
}

.eaa-new-account-description {
    margin: 0 0 24px;
    font-size: 15px;
    color: #222;
}

.eaa-checkout-wrapper .mp-form-row {
    margin-bottom: 20px;
}

.eaa-checkout-wrapper .mp-form-label {
    margin-bottom: 7px;
}

.eaa-checkout-wrapper .mp-form-label label {
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

.eaa-checkout-wrapper .mepr-form-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #ccd4dc;
    border-radius: 5px;
    background: #fff;
    font-size: 15px;
}

.eaa-checkout-wrapper .mepr-form-input:focus {
    outline: none;
    border-color: #0b2d55;
}

.eaa-field-help {
    margin: 6px 0 0;
    font-size: 12px;
    color: #141414;
}


/* ==================================================
   新規登録 → お支払いへ進む
================================================== */

.eaa-checkout-wrapper .mp-form-submit {
    margin-top: 28px;
    text-align: center;
}

.eaa-checkout-wrapper .mp-form-submit .mepr-submit {
    width: 100%;
    max-width: 360px;
}


/* ==================================================
   Stripe 決済画面
================================================== */

.eaa-purchase-page .mp_payment_form_wrapper {
    width: 100%;
    max-width: 920px;
    margin: 32px auto 0;
}

.eaa-purchase-page #mepr-stripe-payment-form {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.eaa-purchase-page .mepr-stripe-elements {
    margin-top: 28px;
}


/* ==================================================
   Stripe 決済確定ボタン
================================================== */

.eaa-purchase-page #mepr-stripe-payment-form .mepr-submit {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    max-width: 360px;
    min-height: 52px;

    margin: 28px auto 0;
    padding: 0 24px;

    border: 0;
    border-radius: 6px;

    background: #0b2d55;
    color: #fff;

    font-size: 16px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;
    transition: opacity 0.2s ease;
}

.eaa-purchase-page #mepr-stripe-payment-form .mepr-submit:hover {
    opacity: 0.88;
}


/* ==================================================
   Mobile
================================================== */

@media (max-width: 767px) {

    .eaa-purchase-page {
        padding: 32px 16px 56px;
    }

    .eaa-purchase-title {
        font-size: 23px;
    }

    .eaa-checkout-title {
        font-size: 21px;
    }

    .eaa-checkout-choice {
        grid-template-columns: 1fr;
    }

    .eaa-checkout-choice-box {
        padding: 22px 20px;
    }

    .eaa-purchase-page #mepr-stripe-payment-form .mepr-submit {
        max-width: none;
    }

    .eaa-purchase-product {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .eaa-purchase-thumbnail {
        flex: none;
        width: 160px;
        max-width: 100%;
    }

    .eaa-purchase-title {
        font-size: 21px;
        line-height: 1.5;
    }

    .eaa-purchase-price {
        font-size: 15px;
    }

    .eaa-purchase-price strong {
        font-size: 20px;
    }

    .eaa-purchase-description {
        margin-top: 12px;
        font-size: 13px;
        line-height: 1.7;
    }


}

@media (max-width: 767px) {
    .eaa-purchase-title,
    .eaa-checkout-title,
    .eaa-checkout-choice-box h2 {
        text-wrap: balance;
    }
}

/* ========================================
   EAA 決済処理中オーバーレイ
======================================== */

.eaa-payment-loading {
  position: fixed;
  inset: 0;
  z-index: 999999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.9);
}

.eaa-payment-loading__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;

  padding: 32px 40px;
  text-align: center;
}

.eaa-payment-loading__spinner {
  width: 44px;
  height: 44px;

  border: 4px solid #dce4ee;
  border-top-color: #0d345f;
  border-radius: 50%;

  animation: eaa-payment-spin 0.8s linear infinite;
}

.eaa-payment-loading__message {
  margin: 0;

  color: #0d345f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
}

@keyframes eaa-payment-spin {
  to {
    transform: rotate(360deg);
  }
}

/* MemberPress標準の小さいGIFは非表示 */
.eaa-checkout-wrapper .mepr-loading-gif {
  visibility: hidden;
}