/* 
 * auth.css 
 * Modern & Premium Login/Signup Modal Styles 
 */

:root {
    --auth-primary: var(--color-primary, #2c3e50);
    --auth-accent: var(--color-accent, #8ec342);
    --auth-bg-glass: rgba(255, 255, 255, 0.98);
    --auth-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    
    /* Social Brand Colors */
    --kakao-yellow: #FEE500;
    --kakao-text: #191919;
    --naver-green: #03C75A;
    --naver-text: #FFFFFF;
    --google-white: #FFFFFF;
    --google-border: #E8EAED;
}

/* Modal Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.auth-modal {
    background: var(--auth-bg-glass);
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.auth-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.auth-close:hover {
    color: #333;
}

/* Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 20px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    color: #999;
    transition: all 0.3s;
}

.auth-tab.active {
    color: var(--auth-primary);
    border-bottom: 3px solid var(--auth-accent);
}

/* Form Container */
.auth-content {
    padding: 30px;
    max-height: 80vh;
    overflow-y: auto;
}

.auth-pane {
    display: none;
}

.auth-pane.active {
    display: block;
}

.auth-header {
    margin-bottom: 25px;
    text-align: center;
}

.auth-header h2 {
    font-size: 1.5rem;
    color: var(--auth-primary);
    margin-bottom: 8px;
}

.auth-header p {
    color: #777;
    font-size: 0.9rem;
}

/* Social Buttons */
.social-login-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 25px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-kakao { background: var(--kakao-yellow); color: var(--kakao-text); }
.btn-naver { background: var(--naver-green); color: var(--naver-text); }
.btn-google { background: var(--google-white); color: #333; border: 1px solid var(--google-border); }

/* OR Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #ddd;
    font-size: 0.85rem;
}

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

.auth-divider span {
    padding: 0 15px;
    color: #999;
}

/* Form Groups */
.auth-form-group {
    margin-bottom: 18px;
}

.auth-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 0.95rem;
    background: #fafafa;
    transition: all 0.3s;
}

.auth-input:focus {
    border-color: var(--auth-accent);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(142, 195, 66, 0.1);
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    height: 52px;
    background: var(--auth-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-submit-btn:hover {
    background: var(--auth-accent);
}

/* User Type Selector */
.auth-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #f0f0f0;
    padding: 5px;
    border-radius: 12px;
}

.auth-type-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    color: #888;
}

.auth-type-btn.active {
    background: #fff;
    color: var(--auth-primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.auth-type-btn:hover:not(.active) {
    color: #555;
}

.auth-footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #777;
}

.auth-footer-text a {
    color: var(--auth-accent);
    font-weight: bold;
    text-decoration: none;
}

/* Message Box */
.auth-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    display: none;
}

.auth-message.error { background: #fee2e2; color: #dc2626; display: block; }
.auth-message.success { background: #dcfce7; color: #16a34a; display: block; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Profile Info Styles in Registration */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Social Signup Specifics */
.auth-social-signup {
    margin-bottom: 25px;
}

.auth-social-signup-header {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.auth-social-signup-header::before, .auth-social-signup-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eee;
}

.auth-social-signup-header span {
    padding: 0 10px;
}

/* Complete Profile Pane */
.auth-profile-complete-pane {
    padding: 20px 0;
}

.auth-profile-complete-pane h3 {
    margin-bottom: 10px;
    color: var(--auth-primary);
    text-align: center;
}

.auth-profile-complete-pane p {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    margin-bottom: 25px;
}

.highlight-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.auth-content::-webkit-scrollbar {
    width: 6px;
}
.auth-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.auth-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Logged-in User Nav Styles */
.user-profile-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8fafc;
    padding: 5px 5px 5px 15px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
}

.user-info-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--auth-primary);
}

.user-info-badge i {
    color: var(--auth-accent);
    font-size: 1.1rem;
}

.user-name b {
    font-weight: 700;
}

.logout-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.logout-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
}

/* User Nav Actions */
.user-nav-actions {
    display: flex;
    gap: 8px;
}

.nav-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-icon-btn:hover {
    background: #f1f5f9;
    color: var(--auth-primary);
}

/* Auth Sub Links (Find ID / PW) */
.auth-sub-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    font-size: 0.85rem;
}

.auth-sub-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.auth-sub-links a:hover {
    color: var(--auth-primary);
    text-decoration: underline;
}

.auth-sub-links .divider {
    color: #ddd;
}

/* Find ID/PW Results */
.auth-result-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    text-align: center;
    display: none;
}

.auth-result-box.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.auth-result-box h4 {
    color: var(--auth-primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.auth-result-box p {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.auth-result-box .found-email {
    font-weight: bold;
    color: var(--auth-accent);
    font-size: 1.1rem;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    margin-bottom: 15px;
    display: inline-block;
}

/* =========================================
   Mobile Responsiveness (Auth Modal)
   ========================================= */
@media (max-width: 768px) {
    .auth-modal {
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        position: fixed;
        bottom: 0;
        animation: slideUpMobile 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    
    .auth-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .auth-content {
        padding: 20px;
        max-height: 85vh;
    }

    .auth-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    @keyframes slideUpMobile {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .user-profile-nav {
        padding: 5px 5px 5px 12px;
        gap: 8px;
    }

    .user-name span {
        display: none; /* 모바일에서 이름 생략 가능 (아이콘 위주) */
    }
}
