/* ==========================================================
   [signup.css] 로시컴 회원가입 페이지 전용 스타일
========================================================== */
/* CSS 초기화 및 기본 스타일 */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Noto Sans KR', sans-serif; }
body { background-color: #fff; height: 100vh; display: flex; overflow: hidden; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: #007672; }

/* ==========================================================
   1. 왼쪽: 비주얼 영역 (녹색 배너)
========================================================== */
.visual-panel {
    flex: 1.2;
    background-color: #f4f7f6;
    background-image: url('../img/sub/signin-bg.png');
    background-size: cover;
    background-position: center;
    position: relative; /* 상단 바를 가두기 위한 기준점 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px; /* 상단 바가 들어갈 여유 공간 확보 */
}
.visual-panel::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,118,114,0.95) 0%, rgba(26,43,76,0.85) 100%);
}

/* 상단 네비게이션 바 (이제 무조건 녹색 배너 안에 갇힙니다!) */
.auth-top-bar {
    position: absolute; top: 0; left: 0; width: 100%; height: 60px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; box-sizing: border-box;
    z-index: 20;
}
.btn-auth-back, .btn-auth-home {
    background: none; border: none; color: #fff !important; font-size: 22px; cursor: pointer; text-decoration: none; padding: 10px;
}
.btn-auth-back:hover, .btn-auth-home:hover { opacity: 0.7; }

/* 배너 내부 컨텐츠 (로고 + 텍스트 수직 정렬) */
.visual-content {
    position: relative; z-index: 10; width: 100%;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 20px; 
}
.brand-logo svg { height: 40px; width: auto; display: block; margin: 0 auto; }
.banner-text h1 { font-size: 32px; font-weight: 700; color: #fff; margin-bottom: 10px; line-height: 1.4; word-break: keep-all; }
.banner-text p { font-size: 16px; font-weight: 300; color: #e0e0e0; line-height: 1.6; word-break: keep-all; margin: 0; }

/* ==========================================================
   2. 오른쪽: 회원가입 폼 영역
========================================================== */
.form-panel {
    flex: 1; background-color: #fff; display: flex; flex-direction: column;
    padding: 60px 10%; overflow-y: auto; 
}
.form-container { width: 100%; max-width: 420px; margin: auto; }

.form-header { margin-bottom: 30px; text-align: center; }
.form-header h2 { font-size: 24px; font-weight: 700; color: #1a2b4c; }
.form-header p { font-size: 14px; color: #777; margin-top: 5px; }

.input-group { position: relative; margin-bottom: 25px; }
.input-group input, .input-group select {
    width: 100%; padding: 12px 0; border: none; border-bottom: 2px solid #ddd;
    font-size: 15px; color: #333; background: transparent; transition: border-color 0.3s; appearance: none; 
}
.input-group input:focus, .input-group select:focus { outline: none; border-bottom-color: #007672; }
.input-group select { cursor: pointer; color: #666; }

.msg-text { font-size: 12px; margin-top: 5px; display: block; }
.msg-error { color: #e74c3c; }
.msg-success { color: #27ae60; }
.msg-info { color: #999; }

/* 약관 동의 박스 */
.terms-group {
    border: 1px solid #eee; border-radius: 8px; padding: 20px;
    margin-top: 10px; margin-bottom: 30px; background: #fafafa;
}
.terms-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.terms-row:last-child { margin-bottom: 0; }
.terms-row.all-check { border-bottom: 1px solid #ddd; padding-bottom: 15px; margin-bottom: 15px; font-weight: 700; }

.checkbox-label { display: flex; align-items: center; font-size: 14px; color: #444; cursor: pointer; }
.checkbox-label input[type="checkbox"] { 
    appearance: none; width: 18px; height: 18px; border: 2px solid #ccc; border-radius: 4px; 
    margin-right: 10px; cursor: pointer; position: relative; transition: 0.2s; flex-shrink: 0; 
}
.checkbox-label input[type="checkbox"]:checked { background-color: #007672; border-color: #007672; }
.checkbox-label input[type="checkbox"]:checked::after {
    content: '✔'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; font-size: 12px;
}
.btn-view-terms { font-size: 12px; color: #888; text-decoration: underline; background: none; border: none; cursor: pointer; flex-shrink: 0; }

.btn-submit {
    width: 100%; padding: 16px; background-color: #007672; color: white; border: none; border-radius: 4px;
    font-size: 16px; font-weight: 500; cursor: pointer; transition: 0.2s;
}
.btn-submit:hover { background-color: #00605d; }

.form-footer { margin-top: 30px; text-align: center; font-size: 13px; color: #777; }
.form-footer a { color: #007672; font-weight: 500; text-decoration: underline; margin-left: 5px; }

/* ==========================================================
   3. 모바일/태블릿 반응형 (화면 깨짐 완벽 방지)
========================================================== */
@media (max-width: 900px) {
    /* ✨ 핵심: body를 블록 요소로 바꾸고 스크롤 허용 */
    body { display: block; overflow-y: auto; height: auto; }
    
    .visual-panel { 
        flex: none; width: 100%; 
        height: auto; /* 고정 높이 삭제! 내용물 크기에 맞춤 */
        padding: 80px 20px 40px 20px; /* 상단바를 가리지 않도록 80px 여유 */
    }
    
    .visual-content { gap: 15px; }
    .brand-logo svg { height: 32px; }
    .banner-text h1 { font-size: 22px; line-height: 1.4; }
    .banner-text p { font-size: 14px; line-height: 1.5; }
    
    .form-panel { flex: none; width: 100%; height: auto; padding: 40px 20px; overflow-y: visible; }
}

/* ==========================================================
   4. 약관 아이프레임 모달 전용 스타일 (추가)
========================================================== */
#policyIframeModal {
    display: none; 
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100vw !important; 
    height: 100vh !important; 
    background: rgba(0, 0, 0, 0.7) !important; /* 배경 어둡게 */
    z-index: 999999 !important; /* 무조건 최상단에 뜨도록 */
    align-items: center !important; 
    justify-content: center !important;
}

#policyIframeModal .modal-content {
    background: #fff;
    width: 90% !important;
    max-width: 600px !important;
    height: 80vh !important;
    border-radius: 15px;
    z-index: 1000000 !important;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    margin: auto;
}

#policyIframeModal .modal-header { 
    margin-bottom: 15px; font-size: 18px; font-weight: 700; color: #222; padding-bottom: 10px; border-bottom: 2px solid #007672;
}
#policyIframeModal .iframe-container { 
    flex: 1; width: 100%; border: 1px solid #eee; border-radius: 8px; overflow: hidden; background: #f7f7f7; margin-bottom: 15px; 
}
#policyIframeModal .iframe-container iframe { 
    width: 100%; height: 100%; display: block; border: none;
}
#policyIframeModal .btn-submit {
    margin-top: 0;
}

/* ==========================================================
   5. 약관 팝업창 X (닫기) 버튼 스타일
========================================================== */
#policyIframeModal .modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: color 0.2s;
}

#policyIframeModal .modal-close:hover {
    color: #333;
}