/* Aurum sign-in page styles
 * 상태(case)별 스타일은 Figma "00_컴포넌트 Sign In Sign Up" 기준.
 */
.custom-form-wrapper {
    --aurum-primary: #1B93FE;
    --aurum-primary-pressed: #1885E4;
    --aurum-error: #E14949;
    --aurum-border: #EDEDED;
    --aurum-text: #252525;
    --aurum-text-label: #505050;
    --aurum-text-sub: #777777;
    --aurum-text-muted: #999999;
    --aurum-icon-hover: #555555;
    --aurum-disabled-bg: #DDDDDD;

    background: #ffffff;
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0px 4px 24px 0px #0000000D;
    box-sizing: border-box;
}

.custom-form-wrapper *,
.custom-form-wrapper *::before,
.custom-form-wrapper *::after {
    box-sizing: border-box;
}

.custom-form-wrapper h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 39px;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--aurum-text);
    margin: 0 0 10px;
}

.custom-form-wrapper .custom-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-form-wrapper .custom-form .custom-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-form-wrapper .custom-form .custom-form-row label,
.custom-form-wrapper .custom-form .custom-form-row a {
    font-size: 14px;
    font-weight: 600;
    line-height: 21px;
    letter-spacing: -0.02em;
    color: var(--aurum-text-label);
}

/* ---------- Input / Text Field ---------- */
.custom-form-wrapper .custom-form .input {
    position: relative;
}

.custom-form-wrapper .custom-form .input input.text {
    width: 100%;
    padding: 15.5px 18px;
    border-radius: 12px;
    border: 1px solid var(--aurum-border);
    background: #ffffff;
    color: var(--aurum-text);
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.2s ease;
}

/* case: placeholder */
.custom-form-wrapper .custom-form .input input.text::placeholder {
    color: var(--aurum-text-muted);
}

/* case: focus */
.custom-form-wrapper .custom-form .input input.text:focus {
    border-color: var(--aurum-primary);
}

/* case: error */
.custom-form-wrapper .custom-form .input input.text.is-error,
.custom-form-wrapper .custom-form .input input.text.is-error:focus {
    border-color: var(--aurum-error);
}

/* case: disabled */
.custom-form-wrapper .custom-form .input input.text:disabled {
    background: #F8F9FB;
    color: var(--aurum-text-muted);
}

/* 비밀번호 표시 토글 */
.custom-form-wrapper .custom-form .input.has-toggle input.text {
    padding-right: 50px;
}

.custom-form-wrapper .custom-form .toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 32px;
    height: 32px;
    margin-top: -16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--aurum-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 테마 기본 button:hover/focus 배경·색상이 덮어쓰지 않도록 고정 */
.custom-form-wrapper .custom-form .toggle-password:hover,
.custom-form-wrapper .custom-form .toggle-password:focus {
    background: transparent;
    color: var(--aurum-text-muted);
    outline: none;
}

/* case: hover / focus — Figma Icon/Visibility 진한 변형 */
.custom-form-wrapper .custom-form .toggle-password:hover,
.custom-form-wrapper .custom-form .toggle-password:focus-visible {
    color: var(--aurum-icon-hover);
}

.custom-form-wrapper .custom-form .toggle-password:focus-visible {
    outline: 2px solid rgba(27, 147, 254, 0.35);
    outline-offset: 2px;
    border-radius: 4px;
}

.custom-form-wrapper .custom-form .toggle-password svg {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
}

.custom-form-wrapper .custom-form .toggle-password .icon-eye-off {
    display: none;
}

.custom-form-wrapper .custom-form .toggle-password.is-visible .icon-eye {
    display: none;
}

.custom-form-wrapper .custom-form .toggle-password.is-visible .icon-eye-off {
    display: block;
}

/* 필드 하단 메시지 */
.custom-form-wrapper .custom-form .message {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    letter-spacing: -0.02em;
    color: var(--aurum-primary);
}

.custom-form-wrapper .custom-form .message:empty {
    display: none;
}

.custom-form-wrapper .custom-form .message.is-error {
    color: var(--aurum-error);
}

/* ---------- 자동입력 방지(reCAPTCHA) — 로그인 3회 연속 실패 시 노출 ---------- */
.custom-form-wrapper .custom-form .custom-form-row.captcha[hidden] {
    display: none;
}

.custom-form-wrapper .custom-form .custom-form-row.captcha .captcha-guide {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    letter-spacing: -0.02em;
    color: var(--aurum-text-label);
}

.custom-form-wrapper .custom-form .custom-form-row.captcha .captcha-widget {
    max-width: 100%;
    overflow: hidden;
}

/* ---------- Checkbox / 자동 로그인 ---------- */
.custom-form-wrapper .custom-form .custom-form-row.accept {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.custom-form-wrapper .custom-form .custom-form-row.accept label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.custom-form-wrapper .custom-form .custom-form-row.accept label,
.custom-form-wrapper .custom-form .custom-form-row.accept a {
    color: var(--aurum-text-sub);
    font-weight: 400;
}

.custom-form-wrapper .custom-form .custom-form-row.accept a {
    text-decoration: none;
}

.custom-form-wrapper .custom-form .custom-form-row.accept a:hover {
    color: var(--aurum-text-label);
}

.custom-form-wrapper .custom-form input[type="checkbox"].accept {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1px solid var(--aurum-text-sub);
    border-radius: 3px;
    background: #ffffff center / 13px 13px no-repeat;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.custom-form-wrapper .custom-form input[type="checkbox"].accept:checked {
    border-color: var(--aurum-primary);
    background-color: var(--aurum-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}

.custom-form-wrapper .custom-form input[type="checkbox"].accept:focus-visible {
    outline: 2px solid rgba(27, 147, 254, 0.35);
    outline-offset: 2px;
}

/* ---------- Button ---------- */
.login-interaction {
    margin-top: 25px;
}

.login-interaction #login-btn {
    background: var(--aurum-disabled-bg);
    border: 0;
    border-radius: 50px;
    box-sizing: border-box;
    min-height: 56px; /* 시안 공통 버튼(Figma 24:3135): 56px / lh 25.5 → 패딩 15.25 */
    padding: 15.25px 0;
    text-align: center;
    width: 100%;
    cursor: default;
    transition: background-color 0.15s ease;
}

.login-interaction #login-btn span {
    color: var(--aurum-text-muted);
    font-size: 18px;
    font-weight: 700;
    line-height: 25.5px;
    letter-spacing: -0.02em;
}

/* case: enabled */
.login-interaction #login-btn.on {
    background: var(--aurum-primary);
    cursor: pointer;
}

.login-interaction #login-btn.on span {
    color: #ffffff;
}

/* case: hover / pressed */
.login-interaction #login-btn.on:hover,
.login-interaction #login-btn.on:active {
    background: var(--aurum-primary-pressed);
}

/* ---------- Text link ---------- */
.login-interaction .sign-up-link {
    margin: 40px 0 0;
    display: flex;
    gap: 4px;
    justify-content: center;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: -0.02em;
}

.login-interaction .sign-up-link p {
    margin: 0;
    color: var(--aurum-text-sub);
}

.login-interaction .sign-up-link a {
    color: var(--aurum-primary);
    font-weight: 600;
    text-decoration: none;
}

.login-interaction .sign-up-link a:hover {
    color: var(--aurum-primary-pressed);
}

@media (max-width: 1024px) {
    .custom-form-wrapper {
        padding: 40px 20px 45px;
        border-radius: 18px;
    }

    .custom-form-wrapper h2 {
        font-size: 22px;
        line-height: 150%;
        margin: 0 0 5px;
    }

    .custom-form-wrapper .custom-form {
        gap: 10px;
    }

    .custom-form label[for="login_id"],
    .custom-form label[for="user_password"] {
        margin: 5px 0 0;
    }

    .custom-form-wrapper .custom-form .custom-form-row {
        gap: 3px;
    }

    .custom-form-wrapper .custom-form .input input.text {
        border-radius: 8px;
        padding: 16px 15px;
    }

    .custom-form-wrapper .custom-form .input.has-toggle input.text {
        padding-right: 48px;
    }

    .login-interaction #login-btn {
        min-height: 52px; /* 시안 공통 버튼 모바일 규격: 13 + 25.5 + 13 = 51.5 → 52px */
        padding: 13px 0;
    }

    .login-interaction #login-btn span {
        font-size: 16px;
    }

    .login-interaction .sign-up-link {
        margin: 15px 0 0;
    }
}

/* Account unlock: visible only after the locked account's password is verified. */
.custom-form-wrapper #login-unlock[hidden] { display: none !important; }
.custom-form-wrapper #login-unlock .unlock-guide,
.custom-form-wrapper #login-unlock .unlock-help { margin: 0; font-size: 14px; line-height: 1.5; }
.custom-form-wrapper #login-unlock .unlock-help { color: var(--aurum-text-sub); }
.custom-form-wrapper #login-unlock .unlock-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.custom-form-wrapper #login-unlock .unlock-actions button { background: transparent; border: 0; padding: 4px 0; color: var(--aurum-primary); font-size: 14px; text-decoration: underline; cursor: pointer; }
.custom-form-wrapper #login-unlock .unlock-actions button:disabled { opacity: .5; cursor: wait; }

/* Match the signup label timer and secondary resend button. */
.custom-form-wrapper #login-unlock .unlock-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.custom-form-wrapper #login-unlock .unlock-countdown { color: var(--aurum-primary); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.4; letter-spacing: -0.02em; }
.custom-form-wrapper #login-unlock .unlock-actions { justify-content: center; }
.custom-form-wrapper #login-unlock .unlock-actions .unlock-resend,
.custom-form-wrapper #login-unlock .unlock-actions .unlock-resend:hover,
.custom-form-wrapper #login-unlock .unlock-actions .unlock-resend:focus {
    display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 56px;
    padding: 0 24px; border: 1px solid #DDDDDD; border-radius: 50px;
    background: #ffffff; color: var(--aurum-text-muted); font-family: inherit;
    font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: -0.02em;
    text-decoration: none; box-shadow: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.custom-form-wrapper #login-unlock .unlock-actions .unlock-resend:not(:disabled):hover,
.custom-form-wrapper #login-unlock .unlock-actions .unlock-resend:not(:disabled):active { border-color: #C7C7C7; color: var(--aurum-text-sub); }
.custom-form-wrapper #login-unlock .unlock-actions .unlock-resend:focus-visible { outline: 2px solid rgb(27 147 254 / 45%); outline-offset: 2px; }
@media (max-width: 1024px) {
    .custom-form-wrapper #login-unlock .unlock-actions .unlock-resend,
    .custom-form-wrapper #login-unlock .unlock-actions .unlock-resend:hover,
    .custom-form-wrapper #login-unlock .unlock-actions .unlock-resend:focus { height: 52px; font-size: 16px; }
}
