﻿/* ==========================================================================
   1. 기본 레이아웃 & 컨테이너 (Global & Container Layout)
   ========================================================================== */
.custom-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;
}

/* 내부 메인 패널 상자 */
.custom-content {
    background-color: #f9f9f9;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

/* ==========================================================================
   2. 2단계 상단 탭 표시 영역 (Account Check Sub Steps)
   ========================================================================== */
.custom-join-step {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.custom-step {
    font-size: 14px;
    color: #666;
    padding: 12px 10px;
    background-color: #e9ecef;
    flex: 1;
    text-align: center;
    position: relative;
    border: 1px solid #ddd;
    border-bottom: none;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    box-sizing: border-box;
}

    .custom-step strong {
        display: block;
        margin-top: 5px;
        font-weight: bold;
    }

/* 현재 탭 활성화 */
.custom-current {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    border-bottom: none;
}

/* 불필요한 가상 요소 물리적 제거 */
.custom-step::after {
    display: none !important;
}

/* ==========================================================================
   3. 섹션 헤더 & 폼 컨트롤 (Section Headers & Form Context)
   ========================================================================== */
.phone-verification-section h2,
.user-phone-section h2 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #2b579a; /* 사이트 표준 네이비 블루 톤 */
    border-bottom: 2px solid #2b579a;
    padding-bottom: 10px;
    font-weight: bold;
}

.user-phone-section {
    margin-top: 30px;
}

/* 인풋 리스트 아이템 가로 배열 (PC 버전) */
.phone-input-list,
.verification-code-list,
.user-phone-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.phone-input-item,
.verification-code-item,
.user-phone-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.phone-label,
.verification-label,
.user-phone-label {
    width: 120px;
    font-weight: bold;
    font-size: 14px;
    color: #333;
    flex-shrink: 0;
}

/* 텍스트 입력창 가변 폭 */
.phone-input,
.verification-input,
.user-phone-input {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

    .user-phone-input[readonly] {
        background-color: #e9ecef;
        color: #495057;
    }

/* 타이머 */
.timer-display {
    font-size: 14px;
    color: #dc3545;
    margin-top: 6px;
    padding-left: 120px;
}

.timer {
    font-weight: bold;
}

/* ==========================================================================
   4. 기능 버튼 제어 영역 (UI Buttons Layout)
   ========================================================================== */
.btn {
    padding: 11px 20px;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

    .btn:disabled,
    .btn[disabled] {
        background-color: #ccc !important;
        cursor: not-allowed;
    }

.request-code-btn {
    background-color: #28a745;
    margin-left: 10px;
}

    .request-code-btn:hover {
        background-color: #218838;
    }

.verify-code-btn {
    background-color: #17a2b8;
    margin-left: 10px;
}

    .verify-code-btn:hover {
        background-color: #138496;
    }

/* 하단 플로우 버튼 제어 */
.button-section {
    text-align: right;
    margin-top: 30px;
}

.next-btn {
    background-color: #007bff;
}

    .next-btn:hover {
        background-color: #0056b3;
    }

.cancel-btn {
    background-color: #6c757d;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

    .cancel-btn:hover {
        background-color: #5a6268;
        color: #fff;
    }

.button-section .btn {
    margin-left: 10px;
}


/* ==========================================================================
   5. 모바일 반응형 인터페이스 조정 (Responsive Mobile - 768px 이하 표준)
   ========================================================================== */
@media (max-width: 768px) {
    /* 캡처 버그 패치: 강제로 부모 레이아웃의 절대 마진 크래시를 방지하고 좌우 꽉 차게 제어 */
    .custom-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 20px 0 !important;
        padding: 10px !important;
        box-shadow: none !important;
        border: none !important;
        box-sizing: border-box !important;
    }

    .custom-content {
        padding: 20px 15px !important;
    }

    /* 캡처 이미지 1번 버그 완벽 수정: 모바일에서 단계 바가 무조건 세로 일렬 배치되도록 강제 주입 */
    .custom-join-step {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .custom-step {
        display: block !important;
        width: 100% !important;
        border-radius: 4px !important;
        border: 1px solid #ddd !important;
        padding: 10px !important;
        text-align: center !important;
    }

    .custom-current {
        border-color: #007bff !important;
    }

    /* 섹션 타이틀 폰트 최적화 */
    .phone-verification-section h2,
    .user-phone-section h2 {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }

    /* 입력 폼 수직 배치 */
    .phone-input-item,
    .verification-code-item,
    .user-phone-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        margin-bottom: 20px !important;
        width: 100% !important;
    }

    .phone-label,
    .verification-label,
    .user-phone-label {
        width: 100% !important;
        font-size: 14px !important;
    }

    /* 모바일 인풋 너비 100% 가득 채우기 */
    .phone-input,
    .verification-input,
    .user-phone-input {
        width: 100% !important;
        flex: none !important;
    }

    /* 모바일 인증 버튼 인풋 아래로 넓게 배치 */
    .custom-content .btn {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 4px !important;
        height: 45px !important;
        line-height: 23px !important;
        display: block !important;
    }

    /* 타이머 들여쓰기 초기화 */
    .timer-display {
        padding-left: 0 !important;
        margin-top: -10px !important;
        margin-bottom: 15px !important;
        font-size: 13px !important;
    }

    /* 캡처 이미지 2번 버그 완벽 수정: 다음/취소 하단 폼 버튼 정렬 및 마진 왜곡 완전 복구 */
    .button-section {
        text-align: center !important;
        margin-top: 25px !important;
        width: 100% !important;
    }

        .button-section form {
            display: flex !important;
            flex-direction: column !important;
            gap: 10px !important;
            width: 100% !important;
        }

        .button-section .btn,
        .button-section .cancel-btn {
            width: 100% !important;
            max-width: 100% !important;
            margin-left: 0 !important;
            padding: 14px 0 !important;
            font-size: 16px !important;
            display: block !important;
        }
}
