﻿/* ==========================================================================
   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. 약관 및 전체 컨텐츠 박스 (Contents Wrap Panel)
   ========================================================================== */
.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: 20px;
        margin-top: 0;
        margin-bottom: 15px;
        color: #333;
    }

/* 약관 내용 스크롤 상자 */
#terms-agreement {
    max-height: 300px;
    overflow-y: auto; /* scroll 대신 가변 스크롤 처리 */
    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 & Info Panels)
   ========================================================================== */
/* 동의 체크박스 영역 */
.checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    cursor: pointer;
}

    .checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 10px;
        cursor: pointer;
    }

    .checkbox label {
        font-size: 16px;
        cursor: pointer;
    }

/* 학생 나이 확인 라디오 영역 */
.agecheck {
    margin: 25px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
}

    .agecheck h2 {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 6px;
    }

    .agecheck p {
        font-size: 14px;
        color: #666;
        margin: 0 0 15px 0;
    }

    .agecheck input[type="radio"] {
        width: 20px;
        height: 20px;
        margin-right: 6px;
        vertical-align: middle;
        cursor: pointer;
    }

    .agecheck label {
        font-size: 16px;
        margin-right: 25px;
        vertical-align: middle;
        cursor: pointer;
    }

        .agecheck label:last-of-type {
            margin-right: 0;
        }

/* 동적 본인인증 안내 문구 상자 (라디오 선택에 따라 노출) */
#guardian-identity-verification-info,
#identity-verification-info {
    background-color: #fff;
    border: 1px solid #ced4da;
    padding: 20px;
    margin-top: 15px;
    border-radius: 6px;
    box-sizing: border-box;
}

    #guardian-identity-verification-info h2,
    #identity-verification-info h2 {
        font-size: 16px;
        color: #1e3d6b; /* 어두운 청색 포인트 */
        margin-top: 0;
        margin-bottom: 12px;
        font-weight: bold;
    }

    #guardian-identity-verification-info p,
    #identity-verification-info p {
        margin: 0;
        color: #495057;
        font-size: 14px;
        line-height: 1.6;
    }

/* ==========================================================================
   5. 하단 버튼 그룹 (Action Buttons)
   ========================================================================== */
.button_box ul {
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 25px 0 0 0;
    list-style: none;
    gap: 15px; /* 마진 대신 flex gap으로 정렬 제어 */
}

    .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;
}

    /* 다음 버튼 */
    .button_box button.next {
        background-color: #007bff;
    }

        .button_box button.next:hover {
            background-color: #0056b3;
        }

/* 취소 버튼 */
.button_box a.btn {
    background-color: #6c757d;
}

    .button_box a.btn:hover {
        background-color: #5a6268;
    }


/* ==========================================================================
   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); /* 50%씩 나누어 가져 모바일에서 2줄로 안착 */
            font-size: 12px;
            padding: 10px 5px;
            border-radius: 4px;
        }

            .join_step .step strong {
                font-size: 13px;
            }

    /* 컨텐츠 안쪽 여백 완화 */
    .c-container {
        padding: 15px;
        margin-top: 15px;
    }

        .c-container h2 {
            font-size: 18px;
        }

    #terms-agreement {
        padding: 10px;
        max-height: 240px; /* 터치 스크롤을 고려해 모바일 높이 약간 축소 */
    }

    /* 나이 확인 라디오 영역 모바일 정렬 */
    .agecheck {
        padding: 15px 10px;
        text-align: left; /* 터치하기 편하도록 좌측 정렬로 전환 */
    }

        .agecheck input[type="radio"] {
            margin-bottom: 5px;
        }

        .agecheck label {
            display: inline-block;
            margin-right: 0;
            width: calc(100% - 30px); /* 라디오 버튼 우측에 레이블이 한 줄씩 배치되도록 너비 조정 */
            margin-bottom: 12px;
        }

            .agecheck label:last-of-type {
                margin-bottom: 0;
            }

    /* 동적 본인인증 안내문 텍스트 패딩 조정 */
    #guardian-identity-verification-info,
    #identity-verification-info {
        padding: 15px;
    }

        #guardian-identity-verification-info p,
        #identity-verification-info p {
            font-size: 13px; /* 폰트 축소로 답답함 해소 */
        }

    /* 하단 다음/취소 버튼 세로 정렬로 큼직하게 변경 */
    .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;
    }
}
