﻿/* ==========================================================================
   1. 기본 레이아웃 & 컨테이너 (Global & Container)
   ========================================================================== */
.container {
    width: 90%;
    max-width: 900px; /* PC 모드 최대 너비 제한 */
    margin: 50px auto;
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* ==========================================================================
   2. 회원가입 단계 표시 영역 (Join Steps)
   ========================================================================== */
.join_step {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: flex;
    justify-content: space-between;
    gap: 2px;
}

    .join_step .step {
        font-size: 14px;
        color: #666;
        padding: 12px 10px;
        background-color: #f0f0f0;
        flex: 1;
        text-align: center;
        box-sizing: border-box;
    }

        .join_step .step.current {
            background-color: #007bff;
            color: #fff;
        }

        .join_step .step strong {
            display: block;
            margin-top: 5px;
            font-weight: bold;
        }

        .join_step .step.current strong {
            color: #fff;
        }

/* ==========================================================================
   3. 약관 본문 상자 영역 (Terms & Conditions)
   ========================================================================== */
.c-container {
    background-color: #ffffff;
    border: 1px solid #ccc;
    padding: 20px;
    margin-top: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

    .c-container h2 {
        font-size: 22px;
        margin-top: 0;
        margin-bottom: 15px;
    }

#terms-agreement {
    max-height: 300px;
    overflow-y: auto; /* scroll 대신 가변 스크롤(auto) 권장 */
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #fff;
}

    #terms-agreement ol {
        margin-left: 20px;
        padding: 0;
    }

    #terms-agreement li {
        margin-bottom: 15px;
        line-height: 1.6;
    }

/* ==========================================================================
   4. 폼 요소 스타일 - 체크박스, 라디오, 본인인증 (Form Inputs & Verification)
   ========================================================================== */
/* 동의 체크박스 */
.checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

    .checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 10px;
        cursor: pointer;
    }

    .checkbox label {
        font-size: 16px;
        cursor: pointer;
    }

/* 나이 확인 라디오 버튼 */
.agecheck {
    margin-bottom: 20px;
    text-align: center;
}

    .agecheck h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .agecheck input[type="radio"] {
        width: 20px;
        height: 20px;
        margin-right: 5px;
        cursor: pointer;
    }

    .agecheck label {
        margin-right: 20px;
        font-size: 16px;
        cursor: pointer;
    }

/* 본인 인증 정보 박스 (숨김 처리용) */
#guardian-identity-verification-info,
#identity-verification-info {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    margin-top: 10px;
    display: none;
    border-radius: 4px;
}

    #guardian-identity-verification-info h2,
    #identity-verification-info h2 {
        font-size: 18px;
        color: #333;
        margin-top: 0;
    }

    #guardian-identity-verification-info p,
    #identity-verification-info p {
        margin-bottom: 10px;
        color: #666;
        font-size: 14px;
    }

/* ==========================================================================
   5. 하단 제어 버튼 그룹 (Action Buttons)
   ========================================================================== */
.button_box ul {
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 25px 0 0 0;
    list-style: none;
    gap: 15px; /* 마진 대신 고정 갭 사용 */
}

    .button_box ul li {
        flex: 1;
        max-width: 430px;
    }

.button_box button,
.button_box a.btn {
    display: block;
    width: 100%;
    height: 50px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    text-align: center;
    line-height: 50px;
    box-sizing: border-box;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

    /* 다음 버튼 색상 */
    .button_box button.next {
        background-color: #007bff;
    }

        .button_box button.next:hover {
            background-color: #0056b3;
        }

/* 취소 버튼 색상 */
.button_box a.btn {
    background-color: #ccc;
    color: #333;
}

    .button_box a.btn:hover {
        background-color: #999;
        color: #fff;
    }


/* ==========================================================================
   6. 모바일 반응형 커스텀 스타일 (Responsive Mobile - 768px 이하)
   ========================================================================== */
@media (max-width: 768px) {
    /* 외곽 컨테이너 여백 축소하여 여유공간 확보 */
    .container {
        width: 100%;
        margin: 10px 0;
        padding: 15px;
        border-radius: 0; /* 모바일은 꽉 차게 패널 형태로 변경 */
        border: none;
        box-shadow: none;
    }

    /* [핵심 수정] 모바일에서 스텝바 글자 겹침 방지 (2열 배치 구조로 변환) */
    .join_step {
        flex-wrap: wrap; /* 공간이 부족하면 아래로 흐르게 설정 */
        gap: 4px;
    }

        .join_step .step {
            flex: 1 1 calc(50% - 4px); /* 모바일 화면에서는 반반씩 2줄(2x2)로 깔끔하게 정렬 */
            font-size: 12px;
            padding: 10px 5px;
            border-radius: 4px;
        }

            .join_step .step strong {
                font-size: 13px;
            }

    /* 약관 내부 박스 */
    .c-container {
        padding: 15px;
    }

        .c-container h2 {
            font-size: 18px;
        }

    #terms-agreement {
        padding: 10px;
        max-height: 250px;
    }

    /* 하단 버튼 배치 세로 정렬로 다듬기 */
    .button_box ul {
        flex-direction: column;
        gap: 10px;
    }

        .button_box ul li {
            max-width: 100%;
            width: 100%;
        }

    .button_box button,
    .button_box a.btn {
        height: 48px;
        line-height: 48px;
        font-size: 16px;
    }
}
