/* Signup Page */

.signup-page {
    min-height: 100vh;

    display: flex;
    justify-content: center;

    padding: 60px 20px;

    background-color: #f7f7f7;
}


/* Signup Container */

.signup-container {
    width: 100%;
    max-width: 560px;
}


/*  Logo */

.auth-logo-area {
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 32px;
}


.auth-logo {
    display: inline-block;

    font-size: 38px;
    font-weight: 800;

    letter-spacing: 1.5px;

    color: #222222;

    line-height: 1;
}


.auth-logo:hover {
    opacity: 0.75;
}


/* Signup Card */

.signup-card {
    padding: 40px;

    background-color: #ffffff;

    border: 1px solid #dddddd;
    border-radius: 16px;
}


/* Title */

.signup-title {
    margin-bottom: 10px;

    text-align: center;

    font-size: 28px;
    font-weight: 700;

    color: #222222;
}


.signup-description {
    margin-bottom: 32px;

    text-align: center;

    color: #777777;

    font-size: 14px;
    line-height: 1.6;
}


/*Form */

.signup-form {
    display: flex;
    flex-direction: column;

    gap: 22px;
}


.form-group {
    display: flex;
    flex-direction: column;

    gap: 8px;
}


.form-group label {
    font-size: 14px;
    font-weight: 600;

    color: #333333;
}


.form-group input,
.form-group select {
    width: 100%;
    height: 48px;

    padding: 0 14px;

    border: 1px solid #cccccc;
    border-radius: 8px;

    background-color: #ffffff;

    font-size: 15px;

    outline: none;
}


.form-group input:focus,
.form-group select:focus {
    border-color: #333333;
}


.form-group input::placeholder {
    color: #aaaaaa;
}

/* =========================================
   Password Input
========================================= */

.password-input-wrap {
    position: relative;

    width: 100%;
}


.password-input-wrap input {
    width: 100%;

    padding-right: 75px;
}


.password-toggle {
    position: absolute;

    top: 50%;
    right: 12px;

    transform: translateY(-50%);

    border: none;

    background: transparent;

    color: #666666;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}


.password-toggle:hover {
    color: #222222;
}


/* Gender */

.gender-group {
    display: flex;
    gap: 24px;

    margin-top: 4px;
}


.gender-option {
    display: flex;
    align-items: center;

    gap: 7px;

    font-size: 14px;
}


.gender-option input {
    width: auto;
    height: auto;
}


/* Agreement */

.agreement-area {
    display: flex;
    flex-direction: column;

    gap: 12px;

    padding: 18px;

    border: 1px solid #e2e2e2;
    border-radius: 8px;

    background-color: #fafafa;
}


.agreement-item {
    display: flex;
    align-items: center;

    gap: 8px;

    font-size: 14px;
}


.agreement-item input {
    width: auto;
    height: auto;
}


/* Validation Error */

.field-error {
    color: #c0392b;

    font-size: 13px;
    line-height: 1.4;
}


/* Signup Button */

.signup-button {
    width: 100%;
    height: 52px;

    margin-top: 8px;

    border: none;
    border-radius: 8px;

    background-color: #222222;
    color: #ffffff;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;
}


.signup-button:not(:disabled):hover {
    background-color: #444444;
}

/*회원가입 처리 중 버튼 */
.signup-button:disabled {
    cursor: not-allowed;

    opacity: 0.6;
}


/* Bottom */

.signup-bottom {
    margin-top: 26px;

    text-align: center;

    color: #666666;

    font-size: 14px;
}


.login-link {
    margin-left: 6px;

    color: #222222;

    font-weight: 700;
}


.login-link:hover {
    text-decoration: underline;
}


/* =========================================
   Field Help
========================================= */

.field-help {
    color: #888888;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================
   Password Rules
========================================= */

.password-rules {
    display: grid;

    grid-template-columns:
            repeat(2, minmax(0, 1fr));

    gap: 6px 12px;

    padding: 12px 14px;

    border-radius: 8px;

    background-color: #f7f7f7;
}


.password-rule {
    margin: 0;

    color: #999999;

    font-size: 12px;
    line-height: 1.5;
}


/* 조건 만족 */

.password-rule.valid {
    color: #218838;

    font-weight: 600;
}


/* 조건 불만족 */

.password-rule.invalid {
    color: #999999;

    font-weight: 400;
}


/* =========================================
   Password Match
========================================= */

.password-match-message {
    min-height: 18px;

    margin: 0;

    font-size: 13px;
    line-height: 1.4;
}


.password-match-message.success {
    color: #218838;

    font-weight: 600;
}


.password-match-message.error {
    color: #c0392b;
}


/* Mobile */

@media (max-width: 600px) {


    .password-rules {
        grid-template-columns: 1fr;
    }



    .signup-page {
        padding: 45px 16px;
    }


    .signup-card {
        padding: 30px 22px;
    }


    .auth-logo {
        font-size: 32px;
    }


    .signup-title {
        font-size: 25px;
    }
}


/* Phone Verification */

.phone-verification-row {
    display: flex;

    align-items: stretch;

    gap: 10px;
}


.phone-verification-row input {
    flex: 1;

    min-width: 0;
}


/* 인증번호 받기 / 인증 확인 */

.phone-verification-button {
    flex-shrink: 0;

    min-width: 125px;

    padding: 0 16px;

    border: 1px solid #333333;
    border-radius: 8px;

    background-color: #333333;

    color: #ffffff;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
            background-color 0.2s ease,
            opacity 0.2s ease;
}


.phone-verification-button:hover:not(:disabled) {
    background-color: #555555;
}


.phone-verification-button:disabled {
    opacity: 0.55;

    cursor: not-allowed;
}


/* 인증번호 영역 */

.phone-code-group {
    margin-top: 8px;
}


/* 인증번호 Timer + Message */

.phone-verification-status {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 8px;
}


.phone-verification-timer {
    color: #666666;

    font-size: 12px;
    font-weight: 600;
}


.phone-verification-message {
    display: block;

    margin-top: 7px;

    color: #777777;

    font-size: 12px;
    line-height: 1.5;
}


/* 성공 */

.phone-verification-message.success {
    color: #16803b;

    font-weight: 700;
}


/* 실패 */

.phone-verification-message.error {
    color: #d93025;

    font-weight: 600;
}


/* =========================================================
   아이디 입력 + 중복 확인
   ========================================================= */

.member-id-row {
    display: flex;
    align-items: stretch;

    gap: 10px;
}


/* 아이디 입력창이 남은 공간을 모두 사용 */
.member-id-row input {
    flex: 1;

    min-width: 0;
}


/* 아이디 중복 확인 버튼 */
.member-id-check-button {
    flex-shrink: 0;

    min-width: 105px;

    padding: 0 16px;

    border: 1px solid #222222;
    border-radius: 8px;

    background-color: #222222;
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
            background-color 0.2s ease,
            border-color 0.2s ease;
}


.member-id-check-button:hover {
    background-color: #000000;
    border-color: #000000;
}


/* 키보드 Tab 이동 시 표시 */
.member-id-check-button:focus-visible {
    outline: 2px solid #555555;
    outline-offset: 2px;
}


/* 비활성화 상태 */
.member-id-check-button:disabled {
    background-color: #cccccc;
    border-color: #cccccc;

    cursor: not-allowed;
}


/* 아이디 검사 메시지 */

.member-id-message {
    min-height: 20px;

    margin-top: 7px;

    font-size: 13px;
    line-height: 1.5;
}


/* 오류 메시지 */
.member-id-message.error {
    color: #d93025;
}


/* 성공 메시지 */
.member-id-message.success {
    color: #188038;
}


/* =========================================================
   Agreement
========================================================= */

.agreement-row {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 12px;
}


.agreement-row .agreement-item {
    flex: 1;
}


/* 약관 내용보기 */

.agreement-detail-button {
    flex-shrink: 0;

    padding: 4px 0;

    border: none;

    background: transparent;

    color: #555555;

    font-size: 12px;
    font-weight: 600;

    text-decoration: underline;

    cursor: pointer;
}


.agreement-detail-button:hover {
    color: #000000;
}


/* =========================================================
   Agreement Dialog
========================================================= */

.agreement-dialog {
    position: fixed;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: calc(100% - 40px);
    max-width: 560px;

    max-height: 80vh;

    margin: 0;
    padding: 0;

    border: none;
    border-radius: 14px;

    background-color: #ffffff;

    box-shadow:
            0 20px 60px
            rgba(0, 0, 0, 0.25);
}


.agreement-dialog::backdrop {
    background-color:
            rgba(0, 0, 0, 0.45);
}


.agreement-dialog-content {
    display: flex;
    flex-direction: column;

    max-height: 80vh;
}


.agreement-dialog-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 20px 22px;

    border-bottom: 1px solid #eeeeee;
}


.agreement-dialog-header h2 {
    margin: 0;

    color: #222222;

    font-size: 20px;
}


.agreement-dialog-close {
    width: 34px;
    height: 34px;

    border: none;

    background: transparent;

    color: #555555;

    font-size: 26px;
    line-height: 1;

    cursor: pointer;
}


.agreement-dialog-body {
    overflow-y: auto;

    padding: 24px 22px;
}


.agreement-dialog-body h3 {
    margin:
            22px 0
            8px;

    color: #222222;

    font-size: 15px;
}


.agreement-dialog-body h3:first-child {
    margin-top: 0;
}


.agreement-dialog-body p {
    margin: 0;

    color: #666666;

    font-size: 14px;
    line-height: 1.8;
}


.agreement-dialog-notice {
    margin-top: 24px !important;

    color: #999999 !important;

    font-size: 12px !important;
}


.agreement-dialog-footer {
    padding: 16px 22px;

    border-top: 1px solid #eeeeee;
}


.agreement-dialog-confirm {
    width: 100%;
    height: 46px;

    border: none;
    border-radius: 8px;

    background-color: #222222;
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}


.field-message {
    min-height: 18px;

    margin-top: 4px;

    font-size: 13px;
    line-height: 1.4;
}

.field-message.error {
    color: #d93025;
}


/* Mobile */

@media (max-width: 600px) {

    /* 전화번호 인증 */

    .phone-verification-row {
        flex-direction: column;
    }


    .phone-verification-button {
        width: 100%;

        min-height: 44px;
    }


    /* 아이디 + 중복 확인 */

    .member-id-row {
        gap: 8px;
    }


    .member-id-check-button {
        min-width: 92px;

        padding: 0 12px;

        font-size: 13px;
    }

    .agreement-row {
        gap: 8px;
    }


    .agreement-detail-button {
        font-size: 11px;
    }


    .agreement-dialog {
        width: calc(100% - 24px);

        max-height: 85vh;
    }
}