/* ========================================
   김치광장 - 로그인/회원가입 공통 CSS (auth.css)
   ======================================== */


/* ========================================
   인증 페이지 레이아웃
   ======================================== */

/* 인증 페이지 전체 래퍼 */
.auth-wrap {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px;
}

/* 인증 카드 박스 */
.auth-box {
    width: 100%;
    max-width: 480px;
}

/* 인증 헤더 (로고 + 타이틀) */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-header .auth-logo img {
    height: 50px;
    width: auto;
    margin: 0 auto 20px;
    display: block;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #292829;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: #888888;
}


/* ========================================
   로그인 폼
   ======================================== */

.auth-form {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 36px;
}

/* 폼 그룹 */
.auth-form .form-group {
    margin-bottom: 16px;
}

/* 레이블 */
.auth-form .form-label {
    font-size: 14px;
    font-weight: 500;
    color: #292829;
    margin-bottom: 6px;
}

/* 입력창 */
.auth-form .form-input {
    width: 100%;
    padding: 13px 14px;
    font-size: 15px;
    border: 1px solid #cccccc;
    outline: none;
    transition: border-color 0.2s;
    color: #292829;
    font-family: inherit;
}

.auth-form .form-input:focus {
    border-color: #292829;
}

.auth-form .form-input::placeholder {
    color: #aaaaaa;
    font-size: 14px;
}

/* 자동로그인 + 비밀번호 찾기 행 */
.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}

/* 체크박스 + 라벨 */
.auth-check-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555555;
    cursor: pointer;
}

.auth-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #292829;
    cursor: pointer;
}

/* 링크 텍스트 */
.auth-link {
    color: #555555;
    font-size: 13px;
    text-decoration: underline;
}

.auth-link:hover {
    color: #6b1210;
}

/* 로그인 버튼 */
.btn-auth-submit {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    background: #292829;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    margin-bottom: 16px;
}

.btn-auth-submit:hover {
    background: #000000;
}

/* 소셜 로그인 구분선 */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #aaaaaa;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* 소셜 로그인 버튼 */
.social-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

/* 카카오 로그인 */
.btn-kakao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px;
    background: #FEE500;
    color: #3C1E1E;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
    width: 100%;
}

.btn-kakao:hover {
    opacity: 0.9;
}

.btn-kakao .social-icon {
    width: 20px;
    height: 20px;
}

/* 네이버 로그인 */
.btn-naver {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px;
    background: #03C75A;
    color: white;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
    width: 100%;
}

.btn-naver:hover {
    opacity: 0.9;
}

/* 하단 링크 (회원가입 안내 등) */
.auth-footer-links {
    text-align: center;
    font-size: 14px;
    color: #888888;
    padding-top: 20px;
}

.auth-footer-links a {
    color: #292829;
    font-weight: 500;
    text-decoration: underline;
}

.auth-footer-links a:hover {
    color: #6b1210;
}

/* 구분 텍스트 */
.auth-footer-links .sep {
    margin: 0 8px;
    color: #cccccc;
}


/* ========================================
   회원가입 폼 추가 스타일
   ======================================== */

/* 회원가입 박스는 좀 더 넓게 */
.auth-box.join-box {
    max-width: 600px;
}

/* 회원가입 동의 섹션 */
.agree-section {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 20px;
}

.agree-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #292829;
    margin-bottom: 16px;
    display: block;
}

/* 전체 동의 체크박스 */
.agree-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 12px;
}

.agree-all label {
    font-size: 15px;
    font-weight: 500;
    color: #292829;
    cursor: pointer;
}

/* 개별 동의 */
.agree-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.agree-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agree-item-left label {
    font-size: 14px;
    color: #555555;
    cursor: pointer;
}

.agree-item-left .required-badge {
    font-size: 11px;
    color: #6b1210;
    border: 1px solid #6b1210;
    padding: 1px 5px;
}

.agree-item a {
    font-size: 12px;
    color: #888888;
    text-decoration: underline;
    white-space: nowrap;
}

/* 체크박스 공통 */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #292829;
    cursor: pointer;
    flex-shrink: 0;
}

/* 2열 그리드 (이름, 전화번호 등 나란히) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 도움말 텍스트 */
.form-help {
    font-size: 12px;
    color: #888888;
    margin-top: 4px;
}

/* 에러 텍스트 */
.form-error {
    font-size: 12px;
    color: #6b1210;
    margin-top: 4px;
    display: none;
}

.form-error.is-visible {
    display: block;
}


/* ========================================
   유틸리티 — 표시/숨김
   ======================================== */
.hidden {
    display: none !important;
}


/* ========================================
   로그인 실패 / 안내 알림 박스
   ======================================== */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: #fdecec;
    border: 1px solid #e8c2c0;
    color: #6b1210;
    font-size: 14px;
    line-height: 1.5;
}

.login-alert .material-icons {
    font-size: 18px;
    color: #6b1210;
    flex-shrink: 0;
    margin-top: 1px;
}


/* ========================================
   QR 접속 안내 박스
   (store_id 가 없을 때만 표시)
   ======================================== */
.qr-required {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 48px 32px;
    text-align: center;
}

.qr-required-inner {
    max-width: 460px;
    margin: 0 auto;
}

/* 큰 QR 아이콘 — 시각적 포인트 */
.qr-required-icon {
    font-size: 84px !important;
    color: #6b1210;
    background: #f9f5f4;
    width: 140px;
    height: 140px;
    line-height: 140px;
    border-radius: 50%;
    display: inline-block;
    margin-bottom: 24px;
}

.qr-required-title {
    font-size: 22px;
    font-weight: 700;
    color: #292829;
    line-height: 1.45;
    margin-bottom: 14px;
}

.qr-required-desc {
    font-size: 14px;
    color: #666666;
    line-height: 1.7;
    margin-bottom: 28px;
}

.qr-required-desc strong {
    color: #6b1210;
    font-weight: 700;
}

/* 안내 단계 리스트 */
.qr-required-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fafafa;
    border: 1px solid #eeeeee;
    padding: 18px 20px;
    margin-bottom: 28px;
    text-align: left;
}

.qr-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #444444;
}

.qr-step .material-icons {
    font-size: 20px;
    color: #6b1210;
    flex-shrink: 0;
}

/* 홈으로 돌아가기 버튼 */
.qr-required-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 22px;
    background: #292829;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.qr-required-home:hover {
    background: #000000;
}


/* ========================================
   매장 ID 뱃지 (헤더 영역)
   ======================================== */
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    padding: 3px 8px;
    background: #f9f5f4;
    border: 1px solid #e8d8d6;
    color: #6b1210;
    font-size: 14px;
    font-weight: 500;
    vertical-align: middle;
}

.store-badge strong {
    font-weight: 700;
}


/* ========================================
   회원 종류 탭 (일반회원 / 업소회원)
   ======================================== */
.member-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 0;
}

.member-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    color: #888888;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}

.member-tab .material-icons {
    font-size: 20px;
}

.member-tab:hover {
    color: #292829;
    background: #ececec;
}

/* 활성화된 탭 — 폼 카드와 시각적으로 연결되도록 */
.member-tab.is-active {
    background: #ffffff;
    color: #292829;
    font-weight: 700;
    border-color: #e0e0e0;
    position: relative;
    z-index: 1;
}

.member-tab.is-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #6b1210;
}

/* 탭과 붙는 폼 카드 — 위쪽 보더 정렬 */
.member-tabs + .auth-form {
    border-top: none;
}


/* ========================================
   회원 종류별 폼 패널 — 활성화된 폼만 표시
   ======================================== */
.member-panel {
    display: none;
}

.member-panel.is-active {
    display: block;
}


/* ========================================
   휴대폰 번호 입력 행 (앞 4 + 뒤 4)
   ======================================== */
.phone-row,
.biz-no-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-prefix {
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 500;
    color: #292829;
    padding: 0 4px;
}

.phone-sep {
    flex-shrink: 0;
    color: #cccccc;
    font-weight: 700;
}

.phone-input {
    text-align: center;
    letter-spacing: 2px;
    flex: 1;
    min-width: 0;
}

.biz-no-input {
    text-align: center;
    letter-spacing: 1px;
    flex: 1;
    min-width: 0;
}


/* ========================================
   파일 업로드 (사업자등록증 사본)
   ======================================== */
.file-upload-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 실제 파일 input 은 화면에서 숨김 (라벨 클릭으로 트리거) */
.file-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 라벨을 버튼처럼 — '파일 선택' */
.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 18px;
    background: #ffffff;
    border: 1px solid #292829;
    color: #292829;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.file-upload-btn:hover {
    background: #292829;
    color: #ffffff;
}

.file-upload-btn .material-icons {
    font-size: 18px;
}

/* 선택된 파일명 표시 */
.file-upload-name {
    font-size: 14px;
    color: #aaaaaa;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-upload-name.has-file {
    color: #292829;
    font-weight: 500;
}


/* 필수 표시(*) 색상 — 기존에 정의 안 된 경우 대비 */
.required {
    color: #6b1210;
}


/* ========================================
   반응형
   ======================================== */

/* 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
    .auth-box.join-box {
        max-width: 560px;
    }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
    .auth-wrap {
        padding: 32px 16px;
        align-items: flex-start;
    }

    .auth-form {
        padding: 24px 20px;
    }

    .auth-header h2 {
        font-size: 20px;
    }

    .auth-box.join-box {
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr; /* 모바일에서 1열 */
    }

    /* 탭 — 모바일에서는 폰트와 패딩 살짝 축소 */
    .member-tab {
        font-size: 14px;
        padding: 14px 8px;
    }

    .member-tab .material-icons {
        font-size: 18px;
    }

    /* QR 안내 — 모바일 패딩/폰트 조정 */
    .qr-required {
        padding: 36px 20px;
    }

    .qr-required-icon {
        font-size: 64px !important;
        width: 110px;
        height: 110px;
        line-height: 110px;
    }

    .qr-required-title {
        font-size: 18px;
    }

    /* 매장 뱃지 — 모바일에서 줄바꿈 */
    .store-badge {
        margin-left: 0;
        margin-top: 6px;
    }

    /* 파일 업로드 — 모바일에서 세로 정렬 */
    .file-upload-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .file-upload-name {
        text-align: center;
    }
}

/* 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
    /* 폰 번호 prefix 고정 폭 살짝 축소 */
    .phone-prefix {
        font-size: 14px;
    }

    .phone-input,
    .biz-no-input {
        font-size: 14px;
        padding: 11px 8px;
        letter-spacing: 1px;
    }
}
