/* ==========================================================================
   账号注册弹窗 — 与 wolverineworldwide.com 设计令牌对齐
   #010101 / ABCDiatype / --ease-power4-out / radius 10-20px
   ========================================================================== */

html.ww-lock,
html.ww-lock body {
    overflow: hidden !important;
}

.ww-modal {
    position: fixed;
    inset: 0;
    z-index: 800; /* 站点 --z-index-modal: 700，弹窗需覆盖菜单(200)与头部(50) */
    display: grid;
    place-items: center;
    padding: 16px;
    font-family: var(--font-sans, "ABCDiatype", system-ui, -apple-system, "Segoe UI", sans-serif);
    color: var(--color-white, #fff);
}

.ww-modal[hidden] {
    display: none;
}

/* 外壳：宽度与最大高度在这里，关闭按钮固定在壳上，不随面板内部滚动而消失 */
.ww-modal_shell {
    position: relative;
    display: flex;
    width: min(580px, 100%);
    max-height: calc(100dvh - 32px);
}

.ww-modal_backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 1, 1, 0.72);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s var(--ease-power2-out, cubic-bezier(0.215, 0.61, 0.355, 1));
}

.ww-modal_panel {
    position: relative;
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(24px, 4.4vw, 44px);
    background: #0b0b0b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 40px 120px -24px rgba(0, 0, 0, 0.75);
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition:
        opacity 0.35s var(--ease-power4-out, cubic-bezier(0.23, 1, 0.32, 1)),
        transform 0.45s var(--ease-power4-out, cubic-bezier(0.23, 1, 0.32, 1));
}

.ww-modal.is-open .ww-modal_backdrop {
    opacity: 1;
}

.ww-modal.is-open .ww-modal_panel {
    opacity: 1;
    transform: none;
}

/* 关闭按钮 */
.ww-modal_close {
    position: absolute;
    z-index: 2;
    top: clamp(16px, 2.4vw, 22px);
    right: clamp(16px, 2.4vw, 22px);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    cursor: pointer;
    transition:
        background 0.2s var(--ease-power2-out, ease),
        border-color 0.2s var(--ease-power2-out, ease);
}

.ww-modal_close:hover,
.ww-modal_close:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.45);
    outline: none;
}

.ww-modal_close svg {
    width: 12px;
    height: 12px;
}

/* 把命中区域向四周扩 10px：点圆边也不落空 */
.ww-modal_close::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
}

/* 标题区 */
.ww-modal_eyebrow {
    margin: 0 0 18px;
    font-family: var(--font-mono, "ABCDiatype-Mono", ui-monospace, monospace);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9d9d9d;
}

.ww-modal_title {
    margin: 0 0 10px;
    font-size: clamp(1.65rem, 3.4vw, 2.15rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.02em;
}

.ww-modal_lede {
    margin: 0 0 clamp(22px, 3.4vw, 30px);
    font-size: 14px;
    line-height: 1.55;
    color: #9d9d9d;
}

/* 表单 */
.ww-form {
    display: grid;
    gap: 18px;
}

.ww-form_row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ww-field {
    display: block;
}

.ww-field > label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-mono, "ABCDiatype-Mono", ui-monospace, monospace);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9d9d9d;
}

.ww-field input {
    width: 100%;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 15px;
    color: #fff;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.ww-field input::placeholder {
    color: #5f5f5f;
}

.ww-field input:focus {
    outline: none;
    background: #191919;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.ww-field input[aria-invalid="true"] {
    border-color: #ff6b6b;
}

.ww-field input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.14);
}

.ww-field_error {
    display: none;
    margin: 7px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #ff8a8a;
}

.ww-field_error:not(:empty) {
    display: block;
}

/* 条款勾选 */
.ww-check {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 12px;
    align-items: start;
    font-size: 13px;
    line-height: 1.5;
    color: #9d9d9d;
    cursor: pointer;
}

.ww-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 5px;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease;
}

.ww-check input:checked {
    background: #fff
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2 4.3 8.6 11 1.4' fill='none' stroke='%23010101' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        center / 11px 9px no-repeat;
    border-color: #fff;
}

.ww-check input:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.ww-check input[aria-invalid="true"] {
    border-color: #ff6b6b;
}

.ww-check_error {
    display: none;
    grid-column: 2;
    font-size: 12px;
    color: #ff8a8a;
}

.ww-check_error:not(:empty) {
    display: block;
}

/* 提交 */
.ww-submit {
    width: 100%;
    padding: 16px 24px;
    margin-top: 2px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #010101;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 999px;
    cursor: pointer;
    transition:
        background 0.22s var(--ease-power2-out, ease),
        color 0.22s var(--ease-power2-out, ease),
        transform 0.22s var(--ease-power2-out, ease);
}

.ww-submit:hover:not(:disabled) {
    background: #d6d6d6;
    border-color: #d6d6d6;
}

.ww-submit:active:not(:disabled) {
    transform: scale(0.99);
}

.ww-submit:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.ww-submit:disabled {
    cursor: progress;
    opacity: 0.7;
}

.ww-modal_footnote {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.55;
    color: #757575;
}

/* 成功态 */
.ww-success {
    display: grid;
    gap: 14px;
    padding: 12px 0 4px;
    text-align: left;
}

.ww-success[hidden] {
    display: none;
}

.ww-success_icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
}

.ww-success_icon svg {
    width: 20px;
    height: 20px;
}

.ww-success p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #9d9d9d;
}

.ww-success strong {
    color: #fff;
    font-weight: 500;
}

.ww-success .ww-submit {
    margin-top: 10px;
}

/* 窄屏 */
@media (max-width: 479px) {
    .ww-form_row {
        grid-template-columns: 1fr;
    }

    .ww-modal_shell {
        max-height: calc(100dvh - 24px);
    }
}

/* 滚动条（面板内） */
.ww-modal_panel {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.ww-modal_panel::-webkit-scrollbar {
    width: 8px;
}

.ww-modal_panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
    .ww-modal_backdrop,
    .ww-modal_panel,
    .ww-submit {
        transition-duration: 0.01ms !important;
    }

    .ww-modal_panel {
        transform: none;
    }
}
