/* ====================================================
   MENETHER Stripe Paywall CSS
   テーマカラー: #e44141 (赤) / #1a1a1a (黒)
   ==================================================== */

/* ペイウォール CTA */
.menether-paywall-cta {
    position: relative;
    margin: 40px 0;
}

.menether-pw-blur-zone {
    height: 80px;
    background: linear-gradient(180deg, transparent 0%, #fff 100%);
    margin-bottom: -20px;
    position: relative;
    z-index: 1;
}

.menether-pw-card {
    background: linear-gradient(180deg, #fff5f5 0%, #ffe8e8 100%);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    border: 2px solid rgba(228,65,65,0.12);
    position: relative;
    z-index: 2;
}

.menether-pw-icons {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.menether-pw-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.menether-pw-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.menether-pw-icon-item span {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.menether-pw-headline {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
}

.menether-pw-price-highlight {
    font-size: 42px;
    font-weight: 800;
    color: #e44141;
    margin-bottom: 8px;
}

.menether-pw-sub {
    font-size: 13px;
    color: #888;
    margin: 0 0 28px;
}

.menether-pw-btn {
    display: inline-block;
    background: linear-gradient(135deg, #e44141 0%, #c93535 60%, #d44 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    padding: 18px 60px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(228,65,65,0.35);
}

.menether-pw-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(228,65,65,0.45);
}

.menether-pw-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.menether-pw-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.menether-pw-badges span {
    font-size: 12px;
    color: #888;
}

/* Codoc既存購入者向けリンク（Stripeモード切替後の救済導線） */
.menether-pw-codoc-legacy {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
    font-size: 11px;
    color: #9ca3af;
    text-align: center;
    line-height: 1.6;
}

.menether-pw-codoc-legacy a {
    color: #6b7280;
    text-decoration: underline;
    margin-left: 4px;
}

.menether-pw-codoc-legacy a:hover {
    color: #e44141;
}

/* スティッキーバー */
.menether-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9999;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}

.menether-sticky-bar span {
    font-size: 13px;
    color: #666;
}

.menether-sticky-bar strong {
    font-size: 20px;
    font-weight: 800;
    color: #e44141;
}

.menether-sticky-bar .menether-purchase-btn {
    background: #e44141;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.menether-sticky-bar .menether-purchase-btn:hover {
    background: #c93535;
}

/* ====================================================
   決済モーダル
   ==================================================== */

.menether-payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

.menether-payment-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.menether-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.menether-modal-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: menether-modal-appear 0.3s ease;
}

@keyframes menether-modal-appear {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

body.menether-modal-open {
    overflow: hidden;
}

/* モーダル閉じるボタン */
.menether-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: all 0.2s;
    z-index: 1;
}

.menether-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

/* モーダルヘッダー */
.menether-modal-header {
    padding: 20px 20px 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.menether-modal-header__title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.menether-modal-header__price {
    font-size: 28px;
    font-weight: 800;
    color: #e44141;
}

.menether-modal-header__desc {
    font-size: 12px;
    color: #999;
    margin: 4px 0 0;
}

/* モーダルボディ */
.menether-modal-body {
    padding: 20px;
}

/* フォーム */
.menether-form-group {
    margin-bottom: 14px;
}

.menether-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.menether-form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.menether-form-input:focus {
    border-color: #e44141;
}

.menether-form-hint {
    font-size: 11px;
    color: #999;
    margin: 4px 0 0;
}

/* Payment Element */
#menether-payment-element {
    min-height: 100px;
    margin-bottom: 20px;
}

/* ボタン */
.menether-payment-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.menether-payment-btn--primary {
    background: linear-gradient(135deg, #e44141, #c93535);
    color: #fff;
}

.menether-payment-btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(228,65,65,0.3);
}

.menether-payment-btn--primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.menether-payment-btn--text {
    background: transparent;
    color: #888;
    font-size: 13px;
    margin-top: 12px;
}

.menether-payment-btn--text:hover {
    color: #e44141;
}

.menether-payment-btn--secondary {
    background: #f5f5f5;
    color: #333;
    margin-top: 8px;
}

/* エラー */
.menether-payment-error {
    display: none;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
}

/* ステップ分割線 */
.menether-step-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: #ccc;
    font-size: 12px;
}

.menether-step-divider::before,
.menether-step-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

.menether-step-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

/* 保存カード */
.menether-saved-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.menether-saved-card.-selected,
.menether-saved-card:hover {
    border-color: #e44141;
    background: #fff5f5;
}

.menether-saved-card input { display: none; }
.menether-saved-card__brand { font-weight: 700; font-size: 13px; }
.menether-saved-card__number { font-size: 14px; color: #333; }
.menether-saved-card__exp { font-size: 12px; color: #999; margin-left: auto; }

/* 成功画面 */
.menether-payment-success {
    text-align: center;
    padding: 24px 0;
}

.menether-payment-success__icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.menether-payment-success__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.menether-payment-success__text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* モーダルフッター */
.menether-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.menether-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #999;
}

.menether-security-badge svg {
    width: 14px;
    height: 14px;
}

/* 購入済みコンテンツ */
.menether-paid-content {
    /* 通常表示 */
}

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

@media (max-width: 600px) {
    .menether-pw-card {
        padding: 32px 20px;
    }

    .menether-pw-headline {
        font-size: 17px;
    }

    .menether-pw-price-highlight {
        font-size: 32px;
    }

    .menether-pw-btn {
        padding: 16px 40px;
        font-size: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .menether-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .menether-sticky-bar {
        padding: 10px 16px;
    }
}

/* =====================================================
   Google Paywall 構造化データ対応 — 有料本文の視覚的非表示
   HTML には有料本文を常に出力（Googlebot は全文インデックス可能）。
   ユーザー画面では完全に display:none で隠す = 本番(Codocモード)と同じ見た目。
   構造化データの cssSelector で Google にペイウォール領域を申告するため、
   display:none でもクローキング扱いにならない（Google公式 Flexible Sampling 準拠）。
   実装根拠: menes-hacks.com の -99% ペナルティ修正パターン (commit 7b0cd69)
   ===================================================== */

.menether-review-paywall {
    display: none;
}

/* =====================================================
   ペイウォール ティーザー（Codocプラグイン同等のUI）
   「この続きを見るには 残り：XXX文字」
   ===================================================== */

.menether-paywall-teaser {
    text-align: center;
    margin: 16px 0 0;
    color: #9ca3af;
}

/* ティーザー直下のCTAは間隔を詰める（CTA本来の40px → 16px） */
.menether-paywall-teaser + .menether-paywall-cta {
    margin-top: 16px;
}

.menether-paywall-teaser__title {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 4px;
    line-height: 1.4;
}

.menether-paywall-teaser__title::before,
.menether-paywall-teaser__title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
    max-width: 110px;
}

.menether-paywall-teaser__count {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
}

.menether-paywall-teaser__count strong {
    color: #6b7280;
    font-weight: 700;
    margin: 0 2px;
    font-size: 13px;
}
