/* =============================================
   WonEasy Login Page Styles
   ============================================= */

/* 브랜드 컬러 변수 정의 */
:root {
    --brand-orange: #F1845C;
    /* 로고의 주황색 */
    --brand-teal: #5BA8A0;
    /* 로고의 청록색 */
}

/* Body 스타일 - 로그인 페이지 전용 */
body.login-page {
    font-family: 'Noto Sans KR', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5;
}

/* 카드 스타일 컨테이너 */
.login-container {
    max-width: 900px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    background-color: var(--brand-orange);
    padding: 0 !important;
}

.login-container>.row {
    margin: 0 !important;
}

.login-container .row>[class*='col'] {
    padding: 0;
}

/* [왼쪽] 브랜드 섹션 스타일 */
.brand-section {
    background-color: var(--brand-orange);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    border-radius: 20px 0 0 20px;
    min-height: 400px;
}

/* [오른쪽] 폼 섹션 스타일 */
.form-section {
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    border-radius: 0 16px 16px 0;
    min-height: 400px;
    margin: -1px -1px -1px 0;
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 1rem 0;
}

/* 입력 필드 스타일 커스텀 */
.login-container .form-control {
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #ddd;
    font-size: 1rem;
}

.login-container .form-control:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 0.25rem rgba(241, 132, 92, 0.25);
}

/* 비밀번호 토글 스타일 */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper .form-control {
    padding-right: 45px;
    /* 아이콘 공간 확보 */
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--brand-orange);
}

.password-toggle:focus {
    outline: none;
    color: var(--brand-teal);
}

/* 로그인 버튼 스타일 */
.btn-login {
    background-color: var(--brand-teal);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    width: 100%;
    transition: all 0.3s;
}

.btn-login:hover {
    background-color: #4c9b93;
    color: white;
    transform: translateY(-2px);
}

.btn-login:focus {
    background-color: var(--brand-teal);
    color: white;
    box-shadow: none;
    outline: none;
}

.btn-login:focus-visible {
    background-color: var(--brand-teal);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(91, 168, 160, 0.5);
    outline: none;
}

.btn-login:active {
    background-color: #4c9b93 !important;
    color: white !important;
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

/* 구분선 (OR) 스타일 */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #aaa;
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

/* 하단 링크 버튼 스타일 */
.bottom-links {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn-outline-custom {
    border: 1px solid #ddd;
    color: #666;
    border-radius: 25px;
    padding: 8px 16px;
    font-size: 0.9rem;
    text-decoration: none;
    width: 100%;
    text-align: center;
    transition: all 0.2s;
}

.btn-outline-custom:hover {
    background-color: rgba(91, 168, 160, 0.15);
    color: var(--brand-teal);
    border-color: var(--brand-teal);
}

.btn-outline-custom:active {
    background-color: rgba(91, 168, 160, 0.25);
    color: var(--brand-teal);
    border-color: var(--brand-teal);
}

/* 모바일 대응: 이미지가 너무 크면 조절 */
.brand-logo {
    max-width: 250px;
    margin-bottom: 20px;
}

.brand-text-mobile {
    color: #333;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: bold;
    display: none;
    /* PC에서는 숨김 */
}

/* 모바일용 로고 */
.brand-logo-mobile {
    display: none;
    /* PC에서는 숨김 */
    max-width: 180px;
    margin: 1rem auto 1rem auto;
}

/* Footer 스타일 */
.login-footer {
    width: 100%;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    color: #666;
    font-size: 0.85rem;
}

.login-footer .footer-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.login-footer .footer-links a:hover {
    color: var(--brand-orange);
}

.login-footer .separator {
    margin: 0 0.5rem;
    color: #ccc;
}

.login-footer .footer-info p {
    margin-bottom: 0.3rem;
}

/* 에러 메시지 스타일 */
.login-container .alert {
    border-radius: 8px;
    font-size: 0.9rem;
}

/* =============================================
   반응형 처리
   ============================================= */
@media (max-width: 767px) {
    .login-container {
        flex-direction: column;
        margin: 16px;
        width: calc(100% - 32px);
    }

    .brand-section {
        display: none;
        /* 모바일에서는 왼쪽 주황색 배경 섹션 숨김 */
    }

    .form-section {
        border-radius: 20px;
        min-height: auto;
        padding: 2.5rem 2rem;
    }

    .brand-logo-mobile {
        display: block;
        /* 모바일에서 폼 위에 로고 표시 */
    }

    .brand-text-mobile {
        display: block;
        /* 모바일에서 폼 위에 텍스트 표시 */
        margin-top: 0;
    }

    .bottom-links {
        margin-bottom: 1rem;
    }

    .login-footer {
        padding: 1.5rem 1rem;
        margin-top: 1.5rem;
        font-size: 0.75rem;
    }
}