/**
 * Login Page Styles
 * =================
 * 로그인/회원가입 페이지 전용 스타일
 * 
 * 네이밍 규칙: BEM (.login__element--modifier)
 * 
 * 사용처: auth/login.html
 * 
 * @see docs/naming_guide/CSS_NAMING_GUIDE.md
 */

/* ========================================
   Card Header
   ======================================== */

.login__card-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    background: #f9fafb;
    border-bottom: 1px solid var(--line);
}

/* ========================================
   Auth Tabs (로그인/회원가입 탭)
   ======================================== */

.login__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    border-bottom: 2px solid #e5e7eb;
}

.login__tab {
    flex: 1;
    padding: 8px 0;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 0;
}

.login__tab.active,
.login__tab--active {
    color: #1e3a8a;
    border-bottom-color: #1e3a8a !important;
}

/* ========================================
   Email Form (이메일 폼)
   ======================================== */

.login__email-form {
    padding-top: 24px;
}

.login__email-form--login {
    display: block;
}

.login__email-form--signup {
    display: none;
}

.login__email-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========================================
   Form Group (폼 그룹)
   ======================================== */

.login__form-group label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.login__form-group input[type="email"],
.login__form-group input[type="password"],
.login__form-group input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.login__form-group input[type="email"]:focus,
.login__form-group input[type="password"]:focus,
.login__form-group input[type="text"]:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.login__form-group input[type="email"]:hover,
.login__form-group input[type="password"]:hover,
.login__form-group input[type="text"]:hover {
    border-color: #c6c9cc;
}

.login__email-form .login__form-group {
    margin-bottom: 0;
}

/* 2열 그리드 (이름/성) */
.login__form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.forgot-row {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin: 4px 0 12px;
}

.forgot-row a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}

.forgot-row a:hover {
    text-decoration: underline;
}

/* ========================================
   Password (비밀번호 입력)
   ======================================== */

.login__password-wrapper {
    position: relative;
}

.login__password-wrapper input {
    padding-right: 48px !important;
}

.login__password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6b7280;
}

.login__password-toggle svg {
    width: 20px;
    height: 20px;
}

.login__password-hint {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #6b7280;
}

/* ========================================
   Terms (약관)
   ======================================== */

.login__terms-wrapper {
    margin-bottom: 8px;
}

.login__terms-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.login__terms-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.login__required-mark {
    color: #ef4444;
}

/* ========================================
   Divider (구분선)
   ======================================== */

.login__divider {
    margin: 32px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.login__divider::before,
.login__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.login__divider span {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* ========================================
   Terms Footer (약관 푸터)
   ======================================== */

.login__terms-footer {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}

.login__terms-footer p {
    font-size: 0.8125rem;
    color: #9ca3af;
    text-align: center;
    line-height: 1.6;
    margin: 0;
}

.login__terms-footer a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 640px) {
    .login__form-grid-2col {
        grid-template-columns: 1fr !important;
    }

    .login__form-group input[type="email"],
    .login__form-group input[type="password"],
    .login__form-group input[type="text"] {
        padding: 12px 14px;
        font-size: 0.9375rem;
    }

    .login__password-wrapper input {
        padding-right: 44px !important;
    }

    .login__submit-btn {
        padding: 14px !important;
        font-size: 1rem !important;
    }

    .login__social-buttons {
        gap: 14px !important;
    }

    .login__social-btn {
        height: 48px;
        font-size: 0.9375rem;
        padding: 0 14px;
    }

    .login__social-btn-icon {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .login__social-buttons {
        gap: 12px !important;
    }

    .login__social-btn {
        height: 46px;
        font-size: 0.875rem;
    }

    .login__social-btn-text {
        white-space: normal;
        font-size: 0.875rem;
    }
}

/* ========================================
   Legacy Support (호환성)
   기존 클래스명 지원 - 점진적 마이그레이션 후 제거 예정
   ======================================== */

.card-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    background: #f9fafb;
    border-bottom: 1px solid var(--line);
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    border-bottom: 2px solid #e5e7eb;
}

.auth-tab {
    flex: 1;
    padding: 8px 0;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 0;
}

.auth-tab.active {
    color: #1e3a8a;
    border-bottom-color: #1e3a8a !important;
}

.email-form {
    padding-top: 24px;
}

.email-form#login-form {
    display: block;
}

.email-form#signup-form {
    display: none;
}

.email-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.form-group input[type="email"]:hover,
.form-group input[type="password"]:hover,
.form-group input[type="text"]:hover {
    border-color: #c6c9cc;
}

.email-form .form-group {
    margin-bottom: 0;
}

.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 48px !important;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6b7280;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-hint {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #6b7280;
}

.terms-wrapper {
    margin-bottom: 8px;
}

.terms-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.terms-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.required-mark {
    color: #ef4444;
}

.auth-divider {
    margin: 32px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.auth-divider span {
    font-size: 0.875rem;
    color: #9ca3af;
}

.terms-footer {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}

.terms-footer p {
    font-size: 0.8125rem;
    color: #9ca3af;
    text-align: center;
    line-height: 1.6;
    margin: 0;
}

.terms-footer a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 640px) {
    .form-grid-2col {
        grid-template-columns: 1fr !important;
    }

    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="text"] {
        padding: 12px 14px;
        font-size: 0.9375rem;
    }

    .password-wrapper input {
        padding-right: 44px !important;
    }

    .auth-submit-btn {
        padding: 14px !important;
        font-size: 1rem !important;
    }

    .social-buttons-container {
        gap: 14px !important;
    }

    .social-btn {
        height: 48px;
        font-size: 0.9375rem;
        padding: 0 14px;
    }

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

@media (max-width: 480px) {
    .social-buttons-container {
        gap: 12px !important;
    }

    .social-btn {
        height: 46px;
        font-size: 0.875rem;
    }

    .social-btn-text {
        white-space: normal;
        font-size: 0.875rem;
    }
}