/**
 * Authentication & Profile Styles
 * Premium styles for auth components
 */

/* ============================================
   User Menu Styles
   ============================================ */

.user-menu-authenticated {
    position: relative;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--animation-fast);
}

.user-avatar-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
}

.user-avatar-btn .avatar-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-btn .fa-user-circle {
    font-size: 32px;
    color: var(--text-muted);
}

.user-avatar-btn .user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-avatar-btn .fa-chevron-down {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform var(--animation-fast);
}

.user-avatar-btn:hover .fa-chevron-down {
    transform: translateY(2px);
}

/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    animation: slide-in-down var(--animation-fast) var(--ease-out-expo);
}

.dropdown-header {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.dropdown-avatar {
    flex-shrink: 0;
}

.dropdown-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-avatar .fa-user-circle {
    font-size: 48px;
    color: var(--text-muted);
}

.dropdown-info {
    flex: 1;
    min-width: 0;
}

.dropdown-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.dropdown-email {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.tier-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
}

.tier-badge.tier-free {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.tier-badge.tier-pro {
    background: var(--gradient-premium);
    color: var(--ds-accent-ink);
}

.tier-badge.tier-enterprise {
    background: linear-gradient(135deg, var(--ds-accent) 0%, var(--ds-accent) 100%);
    color: var(--ds-accent-ink);
}

.dropdown-stats {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.dropdown-stats .stat {
    flex: 1;
    text-align: center;
}

.dropdown-stats .stat-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-stats .stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dropdown-menu {
    padding: 8px;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: all var(--animation-fast);
}

.dropdown-menu a:hover {
    background: var(--bg-tertiary);
}

.dropdown-menu a i {
    width: 20px;
    color: var(--text-muted);
}

.dropdown-menu a.text-danger {
    color: var(--error-color);
}

.dropdown-menu a.text-danger i {
    color: var(--error-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

/* ============================================
   Auth Modal Styles
   ============================================ */

.auth-modal-content {
    width: 100%;
    max-width: 420px;
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
}

.auth-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label a {
    color: var(--premium-primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.btn-full {
    width: 100%;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-light);
}

.auth-divider span {
    position: relative;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-elevated);
    text-transform: uppercase;
}

.auth-social {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--animation-fast);
}

.auth-social-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-dark);
    transform: translateY(-1px);
}

.auth-social-btn.google {
    color: var(--text-primary);
}

.auth-social-btn.google:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.auth-social-btn.github {
    color: var(--text-primary);
}

.auth-social-btn.github:hover {
    border-color: var(--ds-line);
    background: rgba(51, 51, 51, 0.05);
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
}

.auth-footer p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--premium-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Profile Modal Styles
   ============================================ */

.profile-modal-content {
    width: 100%;
    max-width: 600px;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.avatar-preview {
    flex-shrink: 0;
}

.avatar-preview img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-light);
}

.avatar-preview .fa-user-circle {
    font-size: 100px;
    color: var(--text-muted);
}

.avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Button Variants
   ============================================ */

.btn-secondary {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--animation-fast);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--border-dark);
}

.btn-danger {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ds-danger-ink);
    background: var(--error-color);
    border: 1px solid var(--error-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--animation-fast);
}

.btn-danger:hover {
    background: var(--ds-danger);
    border-color: var(--ds-danger);
}

/* ============================================
   Modal Footer
   ============================================ */

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

/* ============================================
   Loading States
   ============================================ */

.fa-spinner.fa-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
