/* FORM_VERSION: 20261009_152558_product_edition */
/* was 20260801_095124_signup_success_fullscreen_modal - 新增版本卡片 .signup-edition-*（首页选「否」后、dashboard 通用版会员注册时显示），支付按钮价格标签 */

.signup-pay-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 24px;
    text-align: center;
}

.signup-pay-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.signup-pay-desc {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.signup-pay-form {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
    justify-items: center;
}

.signup-pay-input {
    width: 100%;
    max-width: 320px;
    padding: 12px 14px;
    border: 1px solid #d7dbe2;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #333;
    background: #f5fafc;
    text-align: center;
}

.signup-pay-input::placeholder {
    color: #7a8794;
    font-size: 0.8rem;
    line-height: 1.25;
    opacity: 1;
}

.signup-pay-input:focus {
    outline: none;
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.15);
    background: #ffffff;
}

.signup-pay-input:focus::placeholder {
    color: transparent;
}

.signup-pay-button {
    width: 100%;
    max-width: 320px;
    padding: 14px 18px;
    border: 1px solid #9b9b9b;
    border-radius: 12px;
    background: linear-gradient(145deg, #f0f0f0 0%, #c0c0c0 15%, #a8a8a8 30%, #888888 50%, #a8a8a8 70%, #c0c0c0 85%, #f0f0f0 100%);
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.signup-pay-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.signup-pay-button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: linear-gradient(145deg, #f8f8f8 0%, #d0d0d0 15%, #b8b8b8 30%, #989898 50%, #b8b8b8 70%, #d0d0d0 85%, #f8f8f8 100%);
    box-shadow:
        0 10px 18px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.signup-pay-status {
    margin-top: 14px;
    width: 100%;
    max-width: 320px;
    padding: 12px 14px;
    background: #eef7fa;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #334155;
    white-space: pre-line;
    text-align: center;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.signup-pay-status.is-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-weight: 700;
}

.signup-pay-update {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #1f4e79;
    font-weight: 500;
    white-space: pre-line;
    text-align: center;
}

.signup-pay-hint {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: center;
}

.register-button {
    background: linear-gradient(145deg, #f0f0f0 0%, #c0c0c0 15%, #a8a8a8 30%, #888888 50%, #a8a8a8 70%, #c0c0c0 85%, #f0f0f0 100%);
    border: 2px solid #999999;
    padding: 12px 24px;
    border-radius: 25px;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 8px;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    width: 100%;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.register-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.register-button:hover:before {
    left: 100%;
}

.register-button:hover {
    background: linear-gradient(145deg, #f8f8f8 0%, #d0d0d0 15%, #b8b8b8 30%, #989898 50%, #b8b8b8 70%, #d0d0d0 85%, #f8f8f8 100%);
    transform: translateY(-2px);
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.register-button:active {
    transform: translateY(1px);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.register-button.is-selected {
    color: #f8d24a;
    text-shadow: 0 0 6px rgba(248, 210, 74, 0.5);
}

.signup-pay-modal[hidden] {
    display: none;
}

.signup-pay-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.signup-pay-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.signup-pay-modal__dialog {
    position: relative;
    width: 100vw;
    min-width: 100%;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 0;
    padding: 72px clamp(18px, 5vw, 64px) 24px;
    padding-top: calc(72px + env(safe-area-inset-top, 0px));
    padding-right: max(clamp(18px, 5vw, 64px), env(safe-area-inset-right, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    padding-left: max(clamp(18px, 5vw, 64px), env(safe-area-inset-left, 0px));
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.signup-pay-modal__close {
    position: absolute;
    top: 14px;
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: 14px;
    right: calc(14px + env(safe-area-inset-right, 0px));
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    color: #4b5563;
    background: rgba(229, 231, 235, 0.88);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.signup-pay-modal__title {
    width: min(100%, 640px);
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 auto 12px;
    text-align: center;
}

.signup-pay-modal__body {
    width: min(100%, 640px);
    margin: 0 auto;
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.6;
    white-space: pre-line;
    text-align: center;
}

.signup-pay-modal__actions {
    display: flex;
    gap: 10px;
    width: min(100%, 420px);
    margin: 18px auto 0;
}

.signup-pay-modal__button {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    color: #ffffff;
    background: #1f6feb;
}

.signup-pay-modal__button--ghost {
    background: #e5e7eb;
    color: #1f2937;
}

.signup-pay-qr-modal[hidden] {
    display: none;
}

.signup-pay-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signup-pay-qr-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.signup-pay-qr-modal__dialog {
    position: relative;
    width: min(92vw, 460px);
    background: #ffffff;
    border-radius: 18px;
    padding: 22px 24px 26px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    z-index: 1;
    text-align: center;
}

.signup-pay-qr-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.signup-pay-qr-modal__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
}

.signup-pay-qr-modal__close {
    border: none;
    background: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
}

.signup-pay-qr-modal__hint {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.signup-pay-qr-modal__status {
    font-size: 0.9rem;
    color: #1f2937;
    background: #eef7fa;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 auto 12px;
    max-width: 320px;
}

.signup-pay-qr-modal__image {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    padding: 10px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.signup-pay-qr-modal__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.signup-pay-qr-modal__foot {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #94a3b8;
}

@media (max-width: 600px) {
    .signup-pay-card {
        padding: 18px;
    }

    .signup-pay-button {
        font-size: 0.95rem;
    }
}

@media (max-width: 900px) {
    .signup-pay-card {
        padding: 20px;
    }
}

@media (max-width: 700px) {
    .signup-pay-card {
        padding: 18px;
        border-radius: 14px;
    }

    .signup-pay-title {
        font-size: 1rem;
    }

    .signup-pay-desc {
        font-size: 0.9rem;
    }

    .signup-pay-input {
        padding: 10px 12px;
    }

    .signup-pay-input::placeholder {
        font-size: 0.76rem;
    }

    .signup-pay-button {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .signup-pay-status {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 560px) {
    .signup-pay-card {
        width: 100%;
        padding: 16px;
    }

    .signup-pay-form {
        gap: 10px;
    }

    .signup-pay-status,
    .signup-pay-update,
    .signup-pay-hint {
        font-size: 0.85rem;
    }

    .signup-pay-modal__dialog {
        padding-top: calc(68px + env(safe-area-inset-top, 0px));
    }

    .signup-pay-modal__actions {
        flex-direction: column;
    }

    .signup-pay-qr-modal__dialog {
        padding: 18px;
    }

    .signup-pay-qr-modal__image {
        width: 170px;
        height: 170px;
    }
}

/* ---------- 版本选择（2026-10-09）：通用营养科学版 / 葆婴USANA版 ----------
   js/signup-pay.js 控制显示与选中；宽度与输入框一致（320px），两张卡片并排，选中卡片蓝色描边。 */
.signup-edition-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 14px;
}

.signup-edition-options[hidden] {
    display: none;
}

.signup-edition-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 72px;
    padding: 10px 8px;
    border: 1px solid #d7dbe2;
    border-radius: 12px;
    background: #f5fafc;
    color: #333;
    font: inherit;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.signup-edition-card:hover {
    border-color: #9db4cc;
}

.signup-edition-card.is-selected {
    border-color: #1f4e79;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.15);
}

.signup-edition-card:focus-visible {
    outline: 2px solid #1f4e79;
    outline-offset: 2px;
}

.signup-edition-card__name {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.signup-edition-card__price {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f4e79;
}

/* 支付按钮后的所选版本价格 */
.signup-pay-button__price {
    font-weight: 700;
    white-space: nowrap;
}
