/**
 * ThinkSmart.Life - Shared Auth Styles
 * Include this on any page that needs login functionality
 */

/* Auth Section in Nav */
.auth-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn:hover {
    background: rgba(255,255,255,0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.875rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #F7941D; /* Orange accent */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.logout-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 0.75rem;
}

.logout-btn:hover {
    color: white;
}

/* Login Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    transform: translateY(-20px);
    transition: transform 0.3s;
}

.modal-overlay.show .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.25rem;
    color: #1a1a1a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

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

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #0066cc;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    display: none;
}

.form-error.show {
    display: block;
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,102,204,0.3);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Guest Notice */
.guest-notice {
    background: rgba(247,148,29,0.1);
    border: 1px solid #F7941D;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.guest-notice strong {
    color: #c77200;
}

.guest-notice .login-btn {
    margin-top: 0.5rem;
    background: #F7941D;
    border-color: #F7941D;
    color: white;
}

.guest-notice .login-btn:hover {
    background: #e08515;
}

/* Dark theme variant (add class "auth-dark" to body or container) */
.auth-dark .login-btn {
    background: rgba(0,0,0,0.2);
    border-color: rgba(0,0,0,0.3);
    color: #333;
}

.auth-dark .user-info {
    color: #333;
}

.auth-dark .logout-btn {
    color: rgba(0,0,0,0.6);
}
