/* 공용 스타일: header, footer, 버튼, 전체 레이아웃, 폰트, 반응형 등 */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Pretendard', 'Noto Sans KR', Arial, sans-serif;
    background: #f8fafc;
}

.navbar-brand img {
    border-radius: 8px;
}

.footer {
    background: #f4f6fa;
    color: #444;
    border-top: 1px solid #e0e4ea;
}

.footer a {
    color: #666 !important;
}

.footer .fw-bold {
    font-weight: 700 !important;
}

.footer .footer-item {
    display: inline-block;
    white-space: nowrap;
    margin-right: 1.2rem;
    margin-bottom: 0.2rem;
}

.navbar-toggler:focus,
.navbar-toggler:active {
    box-shadow: none !important;
    outline: none !important;
}

/* --- 소셜 로그인 및 팝업 스타일 --- */

/* 소셜 버튼 영역 */
.social-btns-wrap {
    max-width: 245px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 소셜 로그인 버튼 공통 */
.social-login-btn {
    width: 230px;
    min-width: 0;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    border: none;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
    position: relative;
    transition: background 0.2s;
}

/* 구글 버튼 */
.social-login-btn.google {
    background: #fff;
    color: #191600;
    border: 1.5px solid #d4d4d3;
}

/* 카카오 버튼 */
.social-login-btn.kakao {
    background: #ffe812;
    color: #191600;
}

/* 애플 버튼 */
.social-login-btn.apple {
    background: #000;
    color: #fff;
}

.social-login-btn.apple:hover {
    background: #2c2c2c;
}

/* 소셜 버튼 아이콘 (구글/카카오/애플 공통) */
.social-login-btn img {
    width: 18px !important;
    height: 18px !important;
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
    display: block;
    position: relative;
    z-index: 1;
}

/* 애플 버튼 아이콘만 흰색으로 */
.social-login-btn.apple img {
    filter: brightness(0) invert(1);
}

/* 카카오 버튼 오른쪽 placeholder */
.social-login-btn-icon-placeholder {
    width: 18px;
    height: 18px;
    margin-left: 8px;
    display: inline-block;
    visibility: hidden;
}

/* 소셜 버튼 텍스트 (구글/카카오 공통) */
.social-login-btn-text {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    display: block;
    pointer-events: none;
    padding-left: 18px;
    /* 아이콘 공간만큼 */
}

/* 약관 안내문구 */
.terms-guide {
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: #888;
}

/* 팝업 전체 래퍼 */
.login-modal-wrap {
    max-width: 320px;
    margin: 0 auto;
    padding: 0;
}

/* 로그인/회원가입 타이틀과 전체동의 체크박스 사이 여백 */
.login-modal-wrap .all-agree-label {
    margin-bottom: 16px;
}

/* 전체동의 체크박스와 약관 상세 사이 여백 */
.login-modal-wrap .terms-detail-card {
    margin-top: 0;
    margin-bottom: 16px;
}

/* 전체 동의 체크박스 */
.all-agree-label {
    font-size: 14px;
    margin-bottom: 16px;
    background: #f6fcf8;
    border-radius: 6px;
    padding: 10px 12px 10px 8px;
    box-shadow: 0 1px 4px rgba(67, 181, 129, 0.07);
    font-weight: 600;
    color: #2e7d4b;
    display: flex;
    align-items: center;
}

.all-agree-text {
    margin-left: 4px;
    font-weight: 700;
    font-size: 15px;
}

/* 약관 상세 */
.terms-detail-card {
    background: #f8fafc;
    border-radius: 6px;
    padding: 8px 6px 4px 6px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(67, 181, 129, 0.07);
    font-size: 12px;
}

.terms-detail-card .custom-check {
    flex-wrap: nowrap;
    width: 100%;
    margin-bottom: 10px;
}

.terms-detail-card .custom-check>.checkmark {
    flex-shrink: 0;
}

.terms-detail-card .custom-check>span {
    display: flex;
    align-items: center;
    gap: 0 4px;
    min-width: 0;
    white-space: nowrap;
    font-size: 12px;
}

.terms-detail-card .badge-required {
    white-space: nowrap;
    font-size: 11px;
}

.terms-detail-card .terms-link {
    margin-left: 4px;
    white-space: nowrap;
    font-size: 11px;
}

/* 체크박스 커스텀 */
.custom-check {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 10px;
}

.custom-check input[type="checkbox"] {
    display: none;
}

.custom-check .checkmark {
    width: 16px;
    height: 16px;
    border: 1.5px solid #43b581;
    border-radius: 3px;
    background: #fff;
    margin-right: 8px;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
    flex-grow: 0;
}

.custom-check input[type="checkbox"]:checked+.checkmark {
    background: #43b581;
    border-color: #43b581;
}

.custom-check .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.custom-check input[type="checkbox"]:checked+.checkmark:after {
    display: block;
}

/* 필수항목 안내 */
.terms-required-guide {
    color: #d32f2f;
    font-size: 12px;
    margin-bottom: 6px;
    text-align: center;
}

/* 구글 로그인 버튼 컨테이너 */


#google-login-container iframe {
    justify-self: center;
}

/* 모바일 반응형 */
@media (max-width: 320px) {
    .login-modal-wrap {
        max-width: 100%;
        padding: 0 8px;
    }

    .social-btns-wrap {
        max-width: 100%;
    }

    .social-login-btn {
        height: 38px;
        font-size: 13px;
    }

    .social-login-btn img {
        width: 16px !important;
        height: 16px !important;
    }

    .social-login-btn-text {
        font-size: 13px;
    }

    .all-agree-label {
        font-size: 13px;
        padding: 8px 10px 8px 6px;
    }

    .all-agree-text {
        font-size: 14px;
    }

    .terms-detail-card {
        padding: 6px 4px 2px 4px;
    }

    .terms-detail-card .custom-check>span {
        font-size: 11px;
    }

    .terms-detail-card .badge-required,
    .terms-detail-card .terms-link {
        font-size: 10px;
    }

    .terms-guide {
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .navbar-nav .nav-link {
        font-size: 0.95rem;
    }

    .btn-outline-primary.small {
        font-size: 0.95rem;
        padding: 0.375rem 0.75rem;
        display: block;
    }

    .navbar-brand span {
        font-size: 1.1rem;
    }

    .footer {
        font-size: 0.85rem;
    }

    .navbar .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    #mainNavbar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #mainNavbar .btn-outline-primary.small {
        width: 100%;
        margin: 1rem 0 0 0;
        box-sizing: border-box;
    }

    #mainNavbar .navbar-nav {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 480px) {

    .login-modal-wrap,
    .social-btns-wrap,
    #google-login-container {
        max-width: 100% !important;
        width: 100% !important;
    }

    .all-agree-label,
    .terms-detail-card {
        margin-left: -8px;
        margin-right: -8px;
    }



    .terms-guide {
        font-size: 12px;
    }
}

@media (min-width: 992px) {
    #mainNavbar {
        display: none !important;
    }

    #userProfileWrapMobile {
        display: none !important;
    }
}

@media (max-width: 992px) {
    #loginBtnPc {
        display: none !important;
    }

    #userProfileWrapPc {
        display: none !important;
    }

}

.swal2-modal-custom.swal2-popup {
    max-width: 320px !important;
    width: 100% !important;
    min-width: unset !important;
    padding: 0 !important;
}

.swal2-close-custom:focus,
.swal2-close-custom:active,
.swal2-close-custom:hover {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

#talkBridgeBtnPc:active,
#talkBridgeBtnMobile:active {
    background: #1abc9c;
}
/* 중첩 드롭다운 메뉴 스타일 */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

/* 서브메뉴 화살표 */
.dropdown-submenu > .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.5em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid transparent;
    border-right: 0;
    border-bottom: 0.3em solid transparent;
    border-left: 0.3em solid;
}

/* PC에서 호버 시 서브메뉴 표시 */
@media (min-width: 992px) {
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
}

/* 모바일에서 클릭으로 토글 */
@media (max-width: 991.98px) {
    .dropdown-submenu .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-left: 1rem;
        border: none;
        box-shadow: none;
    }
    
    /* 모바일에서 화살표를 아래쪽으로 */
    .dropdown-submenu > .dropdown-toggle::after {
        border-left: 0.3em solid transparent !important;
        border-right: 0.3em solid transparent !important;
        border-top: 0.3em solid !important;
        border-bottom: 0 !important;
        margin-left: 0.5em;
    }
}
