/* ==========================================================================
   PC 19금 인증 게이트 오버레이
   - index.php 에서 $need_gate 일 때 로드
   ========================================================================== */

/* [P-31] 원래 풀스크린 오버레이 그대로 두고 body 스크롤 잠금만 해제
   - 게이트는 position: fixed 로 화면 전체를 덮어 콘텐츠 노출 안 함
   - body 의 overflow: hidden 만 제거해서 페이지 스크롤바는 살림 (시각적으로 채리알바 동일)
   - 헤더(#hd, #hd_wrapper)는 비인증 상태에서 숨겨 게이트만 보이게 함
   - 게이트 내부도 overflow-y: auto 로 세로로 긴 콘텐츠 스크롤 가능 */
html.has-gate, html.has-gate body { /* overflow / height 잠금 해제 — 스크롤바 살리기 */ }

/* 헤더 표시 유지 — 오버레이 뒤로 비침 */

.gate-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 99999; background: rgba(255, 255, 255, 0.95);
    display: flex; justify-content: center; align-items: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 내부 컨테이너 — 위아래 패딩으로 잘림 방지 */
.gate-overlay .gate-container { width: 800px; margin: 0 auto; padding: 50px 30px 50px; background: #fff; border-radius: 10px; }

/* 19금 경고 */
.gate-overlay .gate-warn { display: flex; align-items: center; justify-content: center; margin-bottom: 30px; }
.gate-overlay .gate-mark {
    width: 100px; height: 100px; border: 8px solid #e51e26; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 50px; font-weight: 900; color: #000; margin-right: 20px; flex-shrink: 0;
}
.gate-overlay .gate-warn-text h2 { font-size: 18px; color: #555; margin: 0 0 5px 0; font-weight: normal; }
.gate-overlay .gate-warn-text p { font-size: 20px; font-weight: bold; color: #333; margin: 0 0 10px 0; }
.gate-overlay .gate-btn-return {
    background-color: #fff; border: 1px solid #ccc; padding: 5px 15px;
    font-size: 12px; cursor: pointer; color: #333;
}

/* 로그인 박스 래퍼 */
.gate-overlay .gate-login-wrap {
    background-color: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 10px;
    padding: 25px 30px; display: flex; justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 비회원 / 회원 섹션 */
.gate-overlay .gate-guest, .gate-overlay .gate-member { width: 48%; }
.gate-overlay .gate-guest h3, .gate-overlay .gate-member h3 {
    text-align: center; font-size: 16px; margin-top: 0; margin-bottom: 20px;
}
.gate-overlay .gate-inner-box {
    background: #fff; border: 1px solid #eee; border-radius: 5px; padding: 20px;
}
.gate-overlay .gate-guest .gate-inner-box { display: flex; justify-content: center; align-items: center; gap: 10px; }
.gate-overlay .gate-btn-auth {
    background: #f1f1f1; border: 1px solid #ddd; padding: 10px 20px;
    font-size: 13px; cursor: pointer; height: 40px;
}

/* 로그인 폼 */
.gate-overlay .gate-form-group { display: flex; align-items: stretch; margin-bottom: 10px; }
.gate-overlay .gate-input-group { display: flex; flex-direction: column; width: 70%; margin-right: 10px; }
.gate-overlay .gate-input-group input {
    border: 1px solid #ccc; padding: 8px 10px; margin-bottom: 5px; border-radius: 3px; font-size: 13px;
}
.gate-overlay .gate-input-group input:last-child { margin-bottom: 0; }
.gate-overlay .gate-btn-login {
    width: 30%; background-color: #d11832; color: #fff; border: none;
    border-radius: 5px; font-size: 16px; font-weight: bold; cursor: pointer;
}
.gate-overlay .gate-checkbox-group {
    display: flex; font-size: 12px; color: #666; align-items: center; margin-top: 10px;
}
.gate-overlay .gate-checkbox-group label { margin-right: 15px; display: flex; align-items: center; }
.gate-overlay .gate-checkbox-group input[type="checkbox"] { margin-right: 5px; }
.gate-overlay .gate-notice { font-size: 11px; color: #888; margin-top: 10px; line-height: 1.4; }
.gate-overlay .gate-links { text-align: center; margin-top: 10px; font-size: 12px; }
.gate-overlay .gate-links a { color: #888; text-decoration: none; }
.gate-overlay .gate-links a:hover { color: #333; text-decoration: underline; }

/* 하단 도메인 로고 */
.gate-overlay .gate-footer-logo {
    text-align: center; margin-top: 30px; font-size: 24px;
    font-weight: bold; font-style: italic; color: #555; letter-spacing: -0.5px;
}
.gate-overlay .gate-footer-logo .domain-main { color: #d11832; }